mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
add some
This commit is contained in:
parent
83bfa89856
commit
77e5c4b82a
@ -150,7 +150,7 @@ body>div.input tr.icon td:last-child input { padding-left:32px; }
|
||||
body>div.input td span.icon { margin-left:-20px; visibility:hidden; }
|
||||
body>div.input td:hover span.icon { visibility:visible; }
|
||||
body>div.input select { width:230px !important; }
|
||||
body>div.input input:not([type=button]) { width:240px !important; }
|
||||
body>div.input input:not([type=button]) { width:240px; }
|
||||
body>div.input textarea { height:120px; width:240px !important; }
|
||||
body>div.input div.action { width:100%; position:sticky; bottom:0; }
|
||||
body>div.input div.action>div.item { margin:5px; float:right; }
|
||||
|
@ -1,11 +1,12 @@
|
||||
Volcanos(chat.ONFIGURE, {key: {
|
||||
_load: function(event, can, cb, target, name, value) {
|
||||
if (target.value) { return can.onmotion.hidden(can, can._target, can.Status("total") > 0)}
|
||||
can.onmotion.toggle(can, can._target, can.Status("total") > 0)
|
||||
if (target._done && target.value) { return can.onmotion.hidden(can, can._target, can.Status("total") > 0)} target._done = true
|
||||
can.onmotion.hidden(can, can._target)
|
||||
can.runAction(event, mdb.INPUTS, [name, value||""], function(msg) {
|
||||
name == ctx.INDEX && can.core.Item(can.onengine.plugin.meta, function(key) { msg.Push(ctx.INDEX, can.core.Keys(ice.CAN, key)) })
|
||||
can._show(can, msg, cb, target, name)
|
||||
}) },
|
||||
name == ctx.INDEX && can.core.Item(can.onengine.plugin.meta, function(key) { msg.Push(ctx.INDEX, can.core.Keys(ice.CAN, key)) })
|
||||
can._show(can, msg, cb, target, name)
|
||||
})
|
||||
},
|
||||
_show: function(can, msg, cb, target, name) {
|
||||
if (msg.Length() == 0 || msg.Length() == 1 && msg.Append(name) == target.value && target.value != "" || msg.Length() == 1 && msg.Append(name) == "") { return can.onmotion.hidden(can) }
|
||||
if (can.base.isIn(msg.append[msg.append.length-1], ctx.ACTION, "cb")) { msg.append = msg.append.slice(0, -1) } var list = {}
|
||||
@ -18,8 +19,11 @@ Volcanos(chat.ONFIGURE, {key: {
|
||||
}), can.onappend._status(can, [mdb.TOTAL, mdb.INDEX]), can.Status(mdb.TOTAL, msg.Length()), can.onmotion.toggle(can, can._status, msg.Length() > 5)
|
||||
can.page.style(can, can._output, html.MAX_HEIGHT, can.page.height()/2, html.MIN_WIDTH, target.offsetWidth, html.MAX_WIDTH, can.Conf("style.width")||can.page.width()/2)
|
||||
msg.append.length == 1 && can.page.ClassList.add(can, can._target, chat.SIMPLE), can.onlayout._figure({target: target}, can, can._target, false, 200)
|
||||
can.onmotion.toggle(can, can._target, can.Status("total") > 0)
|
||||
},
|
||||
onclick: function(event, can, meta, target, cbs) {
|
||||
// can.onmotion.focus(can, target)
|
||||
},
|
||||
onclick: function(event, can, meta, target, cbs) { can.onmotion.focus(can, target) },
|
||||
onfocus: function(event, can, meta, target, cbs) { cbs(function(sub, cb) { if (sub.Status(mdb.TOTAL) > 0) { return }
|
||||
meta.msg && meta.msg.Length() > 0? sub._show(sub, meta.msg, cb, target, meta.name): sub._load(event, sub, cb, target, meta.name, target.value)
|
||||
}) },
|
||||
|
@ -2,8 +2,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) { var field = can.Conf(mdb.FIELD)||mdb.VALUE, cache = {}, path = msg.Option(nfs.PATH)||can.Conf(nfs.PATH)||"10"
|
||||
var max = 0, data = msg.Table(function(value) { if (parseFloat(value[field]) > max) { max = parseFloat(value[field]) } return {name: value.name, value: value[field]} })
|
||||
var option = {title: {text: msg.Option("title")||can.Conf("title"), textStyle: {fontSize: '24'}, left: '5%'},
|
||||
tooltip: {formatter: function (item) { return item.name+': '+(item.value||"0") }},
|
||||
visualMap: {min: 0, max: max, text: [max]},
|
||||
tooltip: {formatter: function (item) { return item.name+': '+(item.value||"0") }}, visualMap: {min: 0, max: max, text: [max]},
|
||||
}
|
||||
if (can.Conf(ctx.STYLE) == html.FLOAT && !can.page.ClassList.has(can, can._fields, html.FLOAT)) { msg.Option(ice.MSG_STATUS, ""), can.onlayout._float(can) }
|
||||
can.page.requireModules(can, ["echarts/dist/echarts.js"], function() { can.misc.GET(can, "/wiki/geoarea/city.json", function(text) { can.onimport.adcode = JSON.parse(text)
|
||||
|
Loading…
x
Reference in New Issue
Block a user