1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 16:58:06 +08:00
This commit is contained in:
harveyshao 2023-02-13 09:52:42 +08:00
parent c87e93a221
commit 49d0c1ab0e
2 changed files with 8 additions and 3 deletions

View File

@ -24,6 +24,7 @@ Volcanos(chat.ONFIGURE, {date: {
} show(now), can._show = function(d) { d? _cb(show(now = new Date(now.getTime()+d*24*3600*1000))): _cb(show(now)) }
})},
onkeydown: function(event, can, meta, cb, target, sub, last) { if (sub && sub.hidden()) { return last(event) } switch (event.key) {
case lang.ESCAPE: sub.close(); break
case "n": can.page.SelectInput(can, sub._action, mdb.NEXT, function(target) { target.click(), sub._show() }); break
case "p": can.page.SelectInput(can, sub._action, mdb.PREV, function(target) { target.click(), sub._show() }); break
case "t": can.page.SelectInput(can, sub._action, "today", function(target) { target.click(), sub._show() }); break

View File

@ -1,8 +1,12 @@
Volcanos(chat.ONFIGURE, {province: {
onclick: function(event, can, meta, target, cbs) { cbs(function(can, cb) {
can.require(["/require/shylinux.com/x/echarts/echarts.js", "/require/shylinux.com/x/echarts/china.js"], function() {
var chart = echarts.init(can.page.Append(can, can._output, [{type: html.DIV, style: {width: can.page.width()/2, height: can.page.height()/2}}])._target)
var chart = echarts.init(can.page.Appends(can, can._output, [{type: html.DIV, style: {width: can.page.width()/2, height: can.page.height()/2}}])._target)
chart.setOption({geo: {map: 'china'}}), chart.on(html.CLICK, function(params) { target.value = params.name, can.close() })
})
}) }
}), can.onappend._action(can, [cli.CLOSE], can._action, {close: function() { can.close() }})
}) },
onkeydown: function(event, can, meta, cb, target, sub, last) { if (sub && sub.hidden()) { return last(event) } switch (event.key) {
case lang.ESCAPE: sub.close(); break
}
},
}})