1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-26 09:14:06 +08:00
This commit is contained in:
shaoying 2020-10-17 13:26:18 +08:00
parent 1cc0e77715
commit eaad4a6875
3 changed files with 2 additions and 9 deletions

View File

@ -294,7 +294,7 @@ Volcanos("onappend", {help: "渲染引擎", list: [], _init: function(can, meta,
}) })
return sub 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++ function add(item, next) { item._input != "button" && index++
return can._inputs[item.name] = Volcanos(item.name, { _help: item.name, _follow: can._follow+"."+item.name, 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]), _target: can.onappend.input(can, can._option, item.type, item, args[index]),

View File

@ -38,13 +38,6 @@ Volcanos("onaction", {help: "交互操作", list: [], _init: function(can, msg,
value.height = can._target.offsetHeight value.height = can._target.offsetHeight
value.width = can._target.offsetWidth 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) { can.onappend._init(can, value, Volcanos.meta.libs.concat(["/plugin/state.js"]), function(sub) {
sub._legend.onclick = function(event) { sub._legend.onclick = function(event) {
var opt = {pod: can.user.Search(can, "pod"), river: river, storm: storm, active: value.name} var opt = {pod: can.user.Search(can, "pod"), river: river, storm: storm, active: value.name}

View File

@ -16,7 +16,7 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg,
if (t && typeof t == "string") { var ls = t.split(" ") if (t && typeof t == "string") { var ls = t.split(" ")
var vs = ls[0].split("-") var vs = ls[0].split("-")
now.setFullYear(parseInt(vs[0])) now.setFullYear(parseInt(vs[0]))
now.setMonth(parseInt(vs[1])) now.setMonth(parseInt(vs[1])-1)
now.setDate(parseInt(vs[2])) now.setDate(parseInt(vs[2]))
var vs = ls[1].split(":") var vs = ls[1].split(":")