mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
25 lines
1.1 KiB
JavaScript
25 lines
1.1 KiB
JavaScript
Volcanos("onfigure", {help: "控件详情", list: [],
|
|
key: {onclick: function(event, can, item, target) {
|
|
function run() { var msg = can.request(event); msg.Option(item)
|
|
can.run(event, ["action", "inputs", item.name, target.value], function(msg) {
|
|
if (!msg.append) { return }
|
|
|
|
var figure = can.onappend.field(can, document.body, "input key", {})
|
|
can.page.Modify(can, figure.fieldset, {style: {top: event.clientY+10, left: event.clientX}})
|
|
can.page.Remove(can, figure.legend)
|
|
|
|
can.page.Append(can, figure.action, [
|
|
{button: ["清空", function(event) { target.value = "" }]},
|
|
{button: ["关闭", function(event) { can.page.Remove(can, figure.fieldset) }]},
|
|
])
|
|
|
|
can.page.AppendTable(can, figure.output, msg, msg.append, function(event, value, key, index, tr, td) {
|
|
target.value = value; msg.Option("_refresh") && run()
|
|
can.page.Remove(can, figure.fieldset)
|
|
})
|
|
}, true)
|
|
}
|
|
run()
|
|
}},
|
|
})
|