From f8abb7e7c8e6d5911a7dcb2ee268a3512bff76e8 Mon Sep 17 00:00:00 2001 From: shy Date: Sun, 14 Aug 2022 22:11:39 +0800 Subject: [PATCH] opt some --- plugin/input/key.js | 2 +- plugin/local/code/xterm.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/input/key.js b/plugin/input/key.js index bfeffb38..878d2cfd 100644 --- a/plugin/input/key.js +++ b/plugin/input/key.js @@ -6,7 +6,7 @@ Volcanos(chat.ONFIGURE, {help: "控件详情", key: { }, _show: function(can, msg, cbs, target, name) { if (!can.onmotion.toggle(can, can._target, msg.Length() != 0)) { return } - can.onmotion.clear(can), can.onappend.table(can, msg, function(value) { + can.onmotion.clear(can), can.onappend.table(can, msg, function(value, key, index, line) { value = line[key] return {text: [value, html.TD], style: msg.append && msg.append.length == 1? {"min-width": target.offsetWidth-16}: {}, onclick: function(event) { can.base.isFunc(cbs) && cbs(can, value, target.value) msg.Option(ice.MSG_PROCESS) == ice.PROCESS_AGAIN && can.onmotion.delay(can, function() { can.onfigure.key._init(event, can, cbs, target, name, value) diff --git a/plugin/local/code/xterm.js b/plugin/local/code/xterm.js index f8bbfa65..91c403c2 100644 --- a/plugin/local/code/xterm.js +++ b/plugin/local/code/xterm.js @@ -10,7 +10,7 @@ Volcanos(chat.ONIMPORT, {help: "导入数据", _init: function(can, msg, cb, tar var hash = can.sup._hash||can.misc.SearchHash(can)||true, list = msg.Table(function(value) { var item = can.onimport._item(can, value); value.hash == hash && (item.click(), hash = false) - }); hash && can.onimport._create(can, [mdb.TYPE, "", mdb.NAME, "term"]) + }); hash && can.onimport._create(can, [mdb.TYPE, msg.Option("type")||"", mdb.NAME, "term"]) }, 500) }) }, layout: function(can) {