mirror of
https://shylinux.com/x/volcanos
synced 2025-04-26 01:04:06 +08:00
opt some
This commit is contained in:
parent
99e3810918
commit
58a5c410c7
6
frame.js
6
frame.js
@ -306,6 +306,7 @@ Volcanos("onappend", {help: "渲染引擎", list: [], _init: function(can, meta,
|
|||||||
}, [Volcanos.meta.volcano].concat(list), function(sub) { cb(sub)
|
}, [Volcanos.meta.volcano].concat(list), function(sub) { cb(sub)
|
||||||
meta.feature = sub.base.Obj(meta.feature, {})
|
meta.feature = sub.base.Obj(meta.feature, {})
|
||||||
sub.page.ClassList.add(sub, field, meta.feature.style||"")
|
sub.page.ClassList.add(sub, field, meta.feature.style||"")
|
||||||
|
sub.page.ClassList.add(sub, field, meta.style||"")
|
||||||
meta.detail = meta.feature["detail"] || {}
|
meta.detail = meta.feature["detail"] || {}
|
||||||
|
|
||||||
sub.onimport && sub.onimport._init(sub, sub.Conf(meta), list, function() {}, field)
|
sub.onimport && sub.onimport._init(sub, sub.Conf(meta), list, function() {}, field)
|
||||||
@ -317,7 +318,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.args, [])
|
||||||
function add(item, next) { item._input == "text" && 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]),
|
||||||
_option: can._option, _action: can._action, _output: can._output,
|
_option: can._option, _action: can._action, _output: can._output,
|
||||||
@ -476,6 +477,7 @@ Volcanos("onappend", {help: "渲染引擎", list: [], _init: function(can, meta,
|
|||||||
item.value = item.values[1]
|
item.value = item.values[1]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
item.value = value || item.value
|
||||||
input.type = "select", input.list = item.values.map(function(value) {
|
input.type = "select", input.list = item.values.map(function(value) {
|
||||||
return {type: "option", value: value, inner: value}
|
return {type: "option", value: value, inner: value}
|
||||||
})
|
})
|
||||||
@ -483,6 +485,8 @@ Volcanos("onappend", {help: "渲染引擎", list: [], _init: function(can, meta,
|
|||||||
break
|
break
|
||||||
case "textarea":
|
case "textarea":
|
||||||
input.type = "textarea"
|
input.type = "textarea"
|
||||||
|
// item.value = JSON.stringify(can.Conf("content")) || item.value
|
||||||
|
item.value = can.Conf("content") || item.value
|
||||||
// no break
|
// no break
|
||||||
case "password":
|
case "password":
|
||||||
// no break
|
// no break
|
||||||
|
@ -391,3 +391,9 @@ body.white fieldset.plugin table td:hover {
|
|||||||
background-color:lightgray;
|
background-color:lightgray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fieldset.command>form.option>div.item input.args {
|
||||||
|
width:300px;
|
||||||
|
}
|
||||||
|
fieldset.command>form.option>div.item textarea {
|
||||||
|
height:160px;
|
||||||
|
}
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
fieldset>form.option>div.item input.args[name=cmd] {
|
|
||||||
width:300px;
|
|
||||||
}
|
|
||||||
|
|
||||||
fieldset li.H2 {
|
fieldset li.H2 {
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
font-size:20px;
|
font-size:20px;
|
||||||
@ -15,6 +11,15 @@ fieldset h3.story {
|
|||||||
fieldset p.story {
|
fieldset p.story {
|
||||||
white-space:pre;
|
white-space:pre;
|
||||||
}
|
}
|
||||||
|
fieldset div.story[data-name=shell] {
|
||||||
|
padding:4px;
|
||||||
|
border-left:solid 4px blue;
|
||||||
|
background-color:#c2daef;
|
||||||
|
}
|
||||||
|
fieldset div.story[data-name=shell] span:hover {
|
||||||
|
background-color:white;
|
||||||
|
cursor:copy;
|
||||||
|
}
|
||||||
fieldset p.story.shell {
|
fieldset p.story.shell {
|
||||||
padding:4px;
|
padding:4px;
|
||||||
border-left:solid 4px blue;
|
border-left:solid 4px blue;
|
||||||
|
@ -9,6 +9,16 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg,
|
|||||||
})
|
})
|
||||||
return typeof cb == "function" && cb(msg)
|
return typeof cb == "function" && cb(msg)
|
||||||
},
|
},
|
||||||
|
spark: function(can, list, target) {
|
||||||
|
can.page.Select(can, target, "span", function(item) {
|
||||||
|
item.title = "点击复制"
|
||||||
|
item.onclick = function(event) {
|
||||||
|
navigator.clipboard.writeText(item.innerText).then(function() {
|
||||||
|
can.user.toast(can, "复制成功", "paste")
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
iframe: function(can, list, target) { var meta = can.base.Obj(list.meta)
|
iframe: function(can, list, target) { var meta = can.base.Obj(list.meta)
|
||||||
can.page.Modify(can, target, {width: can.Conf("width")-200})
|
can.page.Modify(can, target, {width: can.Conf("width")-200})
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user