mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
add detail
This commit is contained in:
parent
07becadd86
commit
fcd514a4a6
7
frame.js
7
frame.js
@ -183,7 +183,7 @@ var can = Volcanos("chat", {
|
||||
})
|
||||
},
|
||||
Show: function(type, msg, cb) {plugin.msg = msg, msg._plugin_name = name;
|
||||
return plugin._output = plugin[type] = can.Output(plugin, type, msg, cb, output, option)
|
||||
return plugin._output = plugin[type] = can.Output(plugin, feature, type, msg, cb, output, option)
|
||||
},
|
||||
Clone: function(event) {meta.nick = meta.name + can.ID()
|
||||
can.Plugin(can, meta.nick, meta, run,
|
||||
@ -215,9 +215,9 @@ var can = Volcanos("chat", {
|
||||
})
|
||||
return input
|
||||
}),
|
||||
Output: shy("构造组件", function(can, type, msg, cb, target, option) {
|
||||
Output: shy("构造组件", function(can, feature, type, msg, cb, target, option) {
|
||||
if (type == "inner" && (!msg.result || msg.result.length == 0)) {type = "table"}
|
||||
var output = Volcanos(type, {_type: "local", msg: msg,
|
||||
var output = Volcanos(type, {_type: "local", msg: msg, feature: feature,
|
||||
Import: function(event, value, key) {var cb = output.onimport[key];
|
||||
typeof cb == "function" && cb(event, output, value, key, target);
|
||||
},
|
||||
@ -227,6 +227,7 @@ var can = Volcanos("chat", {
|
||||
(output[cmd[1]] || can[cmd[1]] || can.Run)(event, cmd, cb, silent);
|
||||
},
|
||||
}, Config.libs.concat(["plugin/"+type]), function(output) {
|
||||
|
||||
output.onimport.init(output, msg, cb, target, option);
|
||||
}, msg)
|
||||
return output.target = target, target.Output = output
|
||||
|
@ -27,9 +27,13 @@ Volcanos("onimport", {help: "导入数据", list: [],
|
||||
switch (event.target.tagName) {
|
||||
case "TD":
|
||||
can.onimport.which(event, table, msg.append, function(index, key) {
|
||||
can.user.carte(event, shy("", can.ondetail, can.ondetail.list, function(event, cmd, meta) {var cb = meta[cmd];
|
||||
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]);
|
||||
typeof cb == "function"? cb(event, can, msg, index, key, cmd, target):
|
||||
can.run(event, [index, typeof cb == "string"? cb: cmd, key, target.innerHTML], null, true)
|
||||
can.run(event, [id, typeof cb == "string"? cb: cmd, key, target.innerHTML], function(msg) {
|
||||
can.onimport.init(can, msg, cb, output, option)
|
||||
}, true)
|
||||
}))
|
||||
})
|
||||
event.stopPropagation()
|
||||
|
Loading…
x
Reference in New Issue
Block a user