1
0
forked from x/volcanos
This commit is contained in:
harveyshao 2021-11-05 21:23:10 +08:00
parent 5574a1c662
commit 4ea60fc18e
2 changed files with 19 additions and 1 deletions

View File

@ -170,6 +170,24 @@ Volcanos("onaction", {help: "交互操作", list: [
can.Update(event, [ctx.ACTION, "prev", can.Status("total")||0, can.Option("limit"), can.Option("offend")])
},
listTags: function(event, can, button) {
var list = []
can.core.List([
can.base, can.core, can.misc, can.page, can.user,
can.onengine, can.ondaemon,
can.onappend, can.onlayout,
can.onmotion, can.onkeypop,
], function(lib) {
can.core.Item(lib, function(key, value) { if (!lib.hasOwnProperty(key)) { return }
if (key.indexOf("_") == 0) { return }
list.push({zone: lib._name, type: typeof value, name: key, text: can.base.isObject(value)? "": (value+"").split(ice.NL)[0], file: lib._path})
})
})
var msg = can.request(event, {_handle: true, content: can.base.Format(list)})
can.run(event, [button], function() {
can.user.toast(can, "添加成功")
})
},
getClipboardData: function(event, can, button) {
function add(text) {
can.run(event, can.base.Simple(ctx.ACTION, button, can.base.parseJSON(text)), function(msg) {

View File

@ -173,7 +173,7 @@ var Volcanos = shy("火山架", {iceberg: "/chat/", volcano: "/frame.js", args:
}
can = can||{}
var proto = {__proto__: meta, _name: name, _load: function(name, cb) { // 加载缓存
var proto = {__proto__: meta, _path: _can_path, _name: name, _load: function(name, cb) { // 加载缓存
var cache = meta.cache[name]||[]; for (list.reverse(); list.length > 0; list) {
var sub = list.pop(); sub != can && cache.push(sub)
}; meta.cache[name] = cache