diff --git a/frame.js b/frame.js index 12db16dd..cd165c5f 100644 --- a/frame.js +++ b/frame.js @@ -472,6 +472,13 @@ Volcanos("onappend", { _init: function(can, meta, list, cb, target, field) { met } return {type: "td", inner: value, click: function(event) { var target = event.target; if (target.tagName == "INPUT" && target.type == "button") { + switch (target.value) { + case "复制": + navigator.clipboard.writeText(line.text).then(function() { + can.user.toast(can, "复制成功", "paste") + }) + return + } return run(event, event.target.value, value) } can.page.Select(can, can._option, "input.args", function(input) { if (input.name == key) { var data = input.dataset || {} diff --git a/index.css b/index.css index b3670c0d..6d5934ea 100644 --- a/index.css +++ b/index.css @@ -184,6 +184,9 @@ table td:hover { table td.select { background-color:red; } +table td input { + margin-left:4px; +} div.toast { color:yellow;