1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 16:58:06 +08:00
This commit is contained in:
shaoying 2020-06-16 09:44:46 +08:00
parent 851846e54c
commit 2665f9ff98
2 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ var core = Volcanos("core", {help: "核心模块",
}), }),
Item: shy("迭代器", function(obj, cb) {var list = []; Item: shy("迭代器", function(obj, cb) {var list = [];
for (var k in obj) {var res; for (var k in obj) {var res;
list.push(typeof cb == "function" && (res = cb(k, obj[k])) != undefined && res || k) list.push(typeof cb == "function" && (res = cb(k, obj[k])) != undefined? res: k)
} }
return list return list
}), }),

View File

@ -15,7 +15,7 @@ Volcanos("ondetail", {help: "交互菜单", list: ["共享", "更名", "删除"]
msg.Option("_node", value.pod) msg.Option("_node", value.pod)
msg.Option("_group", value.group) msg.Option("_group", value.group)
msg.Option("_index", value.index) msg.Option("_index", value.index)
msg.Option("_args", value.args) msg.Option("_args", JSON.stringify(can.core.Item(sub.Option(), function(key, value) { return value })))
msg.Option("_value", JSON.stringify(sub.Option())) msg.Option("_value", JSON.stringify(sub.Option()))
msg.Option("storm", can.Conf("storm")) msg.Option("storm", can.Conf("storm"))
msg.Option("river", can.Conf("river")) msg.Option("river", can.Conf("river"))