From eaad4a6875d8f4c5523fe0188ab18719eaaa0195 Mon Sep 17 00:00:00 2001 From: shaoying Date: Sat, 17 Oct 2020 13:26:18 +0800 Subject: [PATCH] opt arg --- frame.js | 2 +- pane/Action.js | 7 ------- plugin/local/team/plan.js | 2 +- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/frame.js b/frame.js index f49629ef..6357ccc0 100644 --- a/frame.js +++ b/frame.js @@ -294,7 +294,7 @@ Volcanos("onappend", {help: "渲染引擎", list: [], _init: function(can, meta, }) return sub }, - _option: function(can, meta, list, cb) { var index = -1, args = can.base.Obj(meta.args, []) + _option: function(can, meta, list, cb) { var index = -1, args = can.base.Obj(meta.arg||meta.args, []) function add(item, next) { item._input != "button" && index++ return can._inputs[item.name] = Volcanos(item.name, { _help: item.name, _follow: can._follow+"."+item.name, _target: can.onappend.input(can, can._option, item.type, item, args[index]), diff --git a/pane/Action.js b/pane/Action.js index 98ab6812..a594367c 100644 --- a/pane/Action.js +++ b/pane/Action.js @@ -38,13 +38,6 @@ Volcanos("onaction", {help: "交互操作", list: [], _init: function(can, msg, value.height = can._target.offsetHeight value.width = can._target.offsetWidth - if (can.user.Search(can, "river") == river && can.user.Search(can, "storm") == storm && can.user.Search(can, "active") == value.name) { - value.args = can.core.List(value.inputs, function(item) { - if (item._input == "text" || item._input == "select") { - return can.user.Search(can, item.name) || item.value - } - }) - } can.onappend._init(can, value, Volcanos.meta.libs.concat(["/plugin/state.js"]), function(sub) { sub._legend.onclick = function(event) { var opt = {pod: can.user.Search(can, "pod"), river: river, storm: storm, active: value.name} diff --git a/plugin/local/team/plan.js b/plugin/local/team/plan.js index 9e3376ee..31255e88 100644 --- a/plugin/local/team/plan.js +++ b/plugin/local/team/plan.js @@ -16,7 +16,7 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg, if (t && typeof t == "string") { var ls = t.split(" ") var vs = ls[0].split("-") now.setFullYear(parseInt(vs[0])) - now.setMonth(parseInt(vs[1])) + now.setMonth(parseInt(vs[1])-1) now.setDate(parseInt(vs[2])) var vs = ls[1].split(":")