mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
fix some
This commit is contained in:
parent
b9e4f73c96
commit
8dcb748aab
2
frame.js
2
frame.js
@ -516,7 +516,7 @@ Volcanos("onappend", { _init: function(can, meta, list, cb, target, field) { met
|
||||
},
|
||||
tree: function(can, msg, target, cb) {
|
||||
var list = {}; msg.Table(function(value) {
|
||||
can.core.List(value.path.split("/"), function(item, index, array) {
|
||||
value.path && can.core.List(value.path.split("/"), function(item, index, array) {
|
||||
var last = array.slice(0, index).join("/")
|
||||
var name = array.slice(0, index+1).join("/")
|
||||
list[name] || (list[name] = can.page.Append(can, list[last]||target, [{view: ["item", "div", item+(index==array.length-1?"":"/")], onclick: function(event) {
|
||||
|
@ -124,5 +124,8 @@ Volcanos("onexport", {help: "导出数据", list: [], _init: function(can, msg,
|
||||
typeof cb == "function" && cb()
|
||||
})
|
||||
},
|
||||
time: function(event, can, key, target) { target.innerHTML = can.base.Time().split(" ")[1] },
|
||||
time: function(event, can, key, target) {
|
||||
var list = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"]
|
||||
target.innerHTML = list[(new Date()).getDay()]+" "+can.base.Time().split(" ")[1]
|
||||
},
|
||||
})
|
||||
|
@ -18,7 +18,8 @@ Volcanos("onaction", {help: "控件交互", list: [],
|
||||
})
|
||||
can.run(event, args, function(msg) {
|
||||
can.user.toast(can, "添加成功")
|
||||
})
|
||||
can.run(event)
|
||||
}, true)
|
||||
return true
|
||||
})
|
||||
return
|
||||
|
@ -1,5 +1,6 @@
|
||||
Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg, list, cb, target) { can._target.innerHTML = ""
|
||||
can._name = "plan", can.ui = can.page.Append(can, can._target, [
|
||||
Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg, list, cb, target) {
|
||||
if (!msg.append || !msg.append[0] || !msg[msg.append[0]]) { return }
|
||||
can._name = "plan", can.ui = can.page.Appends(can, can._target, [
|
||||
{view: ["project", "table"], style: {display: can.user.Searchs(can, "project")||"none"}},
|
||||
{view: ["content", "table"]},
|
||||
{view: ["profile", "table"]},
|
||||
@ -356,8 +357,6 @@ Volcanos("onaction", {help: "组件交互", list: [
|
||||
can.onaction.modifyTask(event, can, can.task, "status", "finish", can.task.status)
|
||||
},
|
||||
})
|
||||
Volcanos("ondetail", {help: "菜单交互", list: ["prepare", "process", "finish", "cancel"],
|
||||
})
|
||||
Volcanos("onexport", {help: "导出数据", list: ["count", "begin_time", "zone", "id", "type", "name"],
|
||||
name: function(can, task) {
|
||||
return task.name
|
||||
|
@ -164,6 +164,7 @@ Volcanos("onaction", {help: "组件菜单", list: ["编辑", ["view", "横向",
|
||||
can.width = 0
|
||||
can._tree = can._tree || can.onaction._tree(can, can._msg)
|
||||
can.onaction._height(can, can._tree[""])
|
||||
if (!can._tree[""]) { return }
|
||||
sub.svg.Val("height", can._tree[""].height*30)
|
||||
can.onaction._draw(can, can._tree[""], 0, 0)
|
||||
sub.svg.Val("width", can.width)
|
||||
|
Loading…
x
Reference in New Issue
Block a user