diff --git a/frame.js b/frame.js index dc6063df..fe3a045a 100644 --- a/frame.js +++ b/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) { diff --git a/pane/Header.js b/pane/Header.js index e424fcf1..314657f5 100644 --- a/pane/Header.js +++ b/pane/Header.js @@ -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] + }, }) diff --git a/plugin/input.js b/plugin/input.js index 14b99d5d..4265b279 100644 --- a/plugin/input.js +++ b/plugin/input.js @@ -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 diff --git a/plugin/local/team/plan.js b/plugin/local/team/plan.js index ec3cab6b..d567c353 100644 --- a/plugin/local/team/plan.js +++ b/plugin/local/team/plan.js @@ -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 diff --git a/plugin/story/spide.js b/plugin/story/spide.js index 52e5e702..9d0c057c 100644 --- a/plugin/story/spide.js +++ b/plugin/story/spide.js @@ -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)