1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 16:58:06 +08:00
This commit is contained in:
shylinux 2020-07-15 10:43:32 +08:00
parent 31772af647
commit 40ddb0c8a9
2 changed files with 14 additions and 1 deletions

View File

@ -47,6 +47,9 @@ Volcanos("onaction", {help: "控件交互", list: ["创建", "刷新"], _init: f
}) })
Volcanos("ondetail", {help: "菜单交互", list: ["添加用户", "重命名", "共享", "删除"], _init: function(can, msg, list, cb, target) { Volcanos("ondetail", {help: "菜单交互", list: ["添加用户", "重命名", "共享", "删除"], _init: function(can, msg, list, cb, target) {
can.onexport._init(can, msg, list, cb, target) can.onexport._init(can, msg, list, cb, target)
},
_show: function(event, can) {
}, },
"添加用户": function(event, can, river, button) { "添加用户": function(event, can, river, button) {
can.run(event, ["search", "Search.onimport.select", "user", "", ""], function(list) { can.run(event, ["search", "Search.onimport.select", "user", "", ""], function(list) {

View File

@ -732,7 +732,17 @@ Volcanos("onaction", {help: "组件菜单", list: ["", "项目", "保存", "",
}, },
}) })
Volcanos("ondetail", {help: "组件详情", list: ["复制", "标签", "编辑", "删除"], Volcanos("ondetail", {help: "组件详情", list: ["复制", "标签", "编辑", "删除"],
"删除": function(event, can) { event.target != can.svg && can.page.Remove(can, event.target) }, "删除": function(event, can) { if (event.target == can.svg) { return }
can.core.List(event.target.Value("ship"), function(value) {
can.page.Select(can, can.svg, "."+value.pid, function(item) {
can.page.Remove(can, item)
})
})
can.page.Select(can, can.svg, "."+event.target.Value("text"), function(item) {
can.page.Remove(can, item)
})
can.page.Remove(can, event.target)
},
"编辑": function(event, can) { var target = event.target "编辑": function(event, can) { var target = event.target
var figure = can.onfigure._get(can, target) var figure = can.onfigure._get(can, target)
can.user.input(event, can, can.core.List(["x", "y"].concat(figure.data.copy||[]), function(item) { can.user.input(event, can, can.core.List(["x", "y"].concat(figure.data.copy||[]), function(item) {