1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 08:48:06 +08:00

fix plugin._type

This commit is contained in:
shaoying 2019-12-18 10:10:44 +08:00
parent fcd514a4a6
commit 5b773e0f5b
3 changed files with 4 additions and 4 deletions

View File

@ -110,7 +110,7 @@ var can = Volcanos("chat", {
var args = meta.args || [];
var feature = JSON.parse(meta.feature||'{}');
var exports = JSON.parse(meta.exports||'{}');
var exports = JSON.parse(meta.exports||'""')||feature.exports||[];
var plugin = Volcanos(name, {_type: "local", target: field,
option: field.querySelector("form.option"),
action: field.querySelector("div.action"),
@ -196,7 +196,7 @@ var can = Volcanos("chat", {
return plugin
}),
Inputs: shy("构造控件", function(can, item, type, name, value, cb, option) {
var input = Volcanos(name, {type: "local", item: item,
var input = Volcanos(name, {_type: "local", item: item,
Select: function(event) {can.Select(event, input.target, true)},
Import: function(event, value, key, index) {var cb = input.onimport[item.imports];
value = typeof cb == "function" && cb(event, input, value, key, input.target) || value

View File

@ -14,7 +14,7 @@ Volcanos("onimport", {help: "导入数据", list: [],
})
can.run(event, [can.Conf("river"), "spawn", ui.name.value].concat(list), function(msg) {
can.Hide(), can.Export(event, "update", "ocean");
can.Hide(), can.Export(event, "update", "storm");
})
}]}, {name: "list", view: ["list", "table"], list: [{text: ["3. 已选命令列表", "caption"]}]},
]}])

View File

@ -29,7 +29,7 @@ Volcanos("onimport", {help: "导入数据", list: [],
can.onimport.which(event, table, msg.append, function(index, key) {
can.user.carte(event, shy("", can.ondetail, can.feature.detail || can.ondetail.list, function(event, cmd, meta) {var cb = meta[cmd];
var id = index;
msg && msg.id && (id = msg.id[index]);
msg && msg.id && (id = msg.id[index]) || msg && msg.name && (id = msg.name[index]);
typeof cb == "function"? cb(event, can, msg, index, key, cmd, target):
can.run(event, [id, typeof cb == "string"? cb: cmd, key, target.innerHTML], function(msg) {
can.onimport.init(can, msg, cb, output, option)