diff --git a/frame.js b/frame.js index 3b79c40f..5aa0dd23 100644 --- a/frame.js +++ b/frame.js @@ -552,8 +552,11 @@ Volcanos("onappend", { _init: function(can, meta, list, cb, target, field) { met case "select": item.values = typeof item.values == "string"? item.values.split(" "): item.values if (!item.values && item.value) { - item.values = item.value.split("|") + item.values = item.value.split("|") item.value = item.values[0] + if (item.values[0] == "day") { + item.value = item.values[1] + } } input.type = "select", input.list = item.values.map(function(value) { return {type: "option", value: value, inner: value} @@ -586,7 +589,7 @@ Volcanos("onappend", { _init: function(can, meta, list, cb, target, field) { met item.type == "text" && !target.placeholder && (target.placeholder = item.name || "") item.type == "text" && !target.title && (target.title = target.placeholder) // item.type == "button" && item.action == "auto" && can.run && can.run({}) - // item.type == "select" && (target.value = item.value || item.values[item.index||0]) + item.type == "select" && item.value && (target.value = item.value) return target }, table: function(can, target, type, msg, cb) { diff --git a/plugin/local/team/plan.js b/plugin/local/team/plan.js index 9ec2cd3d..65f6c1b2 100644 --- a/plugin/local/team/plan.js +++ b/plugin/local/team/plan.js @@ -130,7 +130,7 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg, }) var head = ["hour"].concat(["周日", "周一", "周二", "周三", "周四", "周五", "周六"]); - var list = [0]; for (var i = 6; i < 24; i++) { list.push(i) } + var list = [0]; for (var i = 6; i < 24; i++) { list.push(can.base.Number(i, 2)) } function set(week, hour) { return can.base.Time(can.base.TimeAdd(begin_time, week-begin_time.getDay()+hour/24)) } var table = can.page.Append(can, can.ui.content, [{type: "table", list: