1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 16:58:06 +08:00
This commit is contained in:
harveyshao 2021-08-25 19:41:21 +08:00
parent 1da76c827b
commit dc242594a7
5 changed files with 7 additions and 12 deletions

View File

@ -657,6 +657,6 @@ body.print fieldset.River>div.output div.item.select {
border:solid 2px red; border:solid 2px red;
} }
div.output fieldset.left>fieldset { div.output fieldset.span>fieldset {
float:left; overflow:auto; float:left; overflow:auto;
} }

View File

@ -30,9 +30,6 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg)
}}]) }}])
can.page.Modify(can, sub._output, {style: {"max-width": meta.width}}) can.page.Modify(can, sub._output, {style: {"max-width": meta.width}})
can.onengine.listen(can, "onaction_resize", function(width, height) {
can.page.Modify(can, sub._output, {style: {"max-width": meta.width = width-40}})
})
sub._option.dataset = sub._option.dataset || {} sub._option.dataset = sub._option.dataset || {}
meta.id && (sub._option.dataset.id = meta.id) meta.id && (sub._option.dataset.id = meta.id)
@ -102,9 +99,7 @@ Volcanos("onaction", {help: "交互操作", list: [], _init: function(can, msg,
var ls = location.pathname.split("/") var ls = location.pathname.split("/")
can.onimport._share(can, can.user.Search(can, can._SHARE) || ls[1]=="share" && ls[2]) can.onimport._share(can, can.user.Search(can, can._SHARE) || ls[1]=="share" && ls[2])
}, },
onresize: function(can, msg, width, height) { var args = {width: width, height: height} onresize: function(can, msg, width, height) { can.Conf({width: width, height: height}) },
can.Conf(args), can.onengine.signal(can, "onaction_resize", can.request({}, args))
},
onsearch: function(can, msg, word) { onsearch: function(can, msg, word) {
if (word[0] == "*" || word[0] == can._PLUGIN) { can.onexport.plugin(can, msg, word) } if (word[0] == "*" || word[0] == can._PLUGIN) { can.onexport.plugin(can, msg, word) }
}, },

View File

@ -15,7 +15,7 @@ Volcanos("onaction", {help: "交互操作", list: [], _init: function(can, msg,
can.page.ClassList.add(can, can._target, "Action") can.page.ClassList.add(can, can._target, "Action")
}, },
_plugin: function(can, index, args, next) { _plugin: function(can, index, args, next) {
can.onappend.plugin(can, {type: "plugin", index: index, args: args, opts: can.user.Search(), width: window.innerWidth}, function(sub, meta) { can.onappend.plugin(can, {type: "plugin", index: index, args: args, opts: can.user.Search(), width: window.innerWidth-40}, function(sub, meta) {
sub.run = function(event, cmds, cb) { sub.run = function(event, cmds, cb) {
can.run(event, can.misc.Concat([ctx.ACTION, "run", index], cmds), cb) can.run(event, can.misc.Concat([ctx.ACTION, "run", index], cmds), cb)
} }

View File

@ -1,7 +1,7 @@
fieldset.div div.output td { fieldset.div div.output td {
vertical-align:top; vertical-align:top;
} }
fieldset.div div.output fieldset.float>fieldset { fieldset.div div.output fieldset.span>fieldset {
float:left; overflow:auto; float:left; overflow:auto;
} }
fieldset.panel.cmd.main fieldset.div { fieldset.panel.cmd.main fieldset.div {

View File

@ -44,13 +44,13 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg,
} }
ui.item._add = function(data) { ui.item._add = function(data) {
if (node.meta.style == "left") { width = width * node.list.length } if (node.meta.style == "span") { width = width * node.list.length }
node.list.push(data) node.list.push(data)
if (node.meta.style == "left") { width = width / node.list.length } if (node.meta.style == "span") { width = width / node.list.length }
can.onmotion.clear(can, ui.list), can.onmotion.clear(can, ui.list._fieldset) can.onmotion.clear(can, ui.list), can.onmotion.clear(can, ui.list._fieldset)
can.core.List(node.list, function(node) { can.onimport._item(can, node, ui.list, width) }) can.core.List(node.list, function(node) { can.onimport._item(can, node, ui.list, width) })
} }
if (node.meta.style == "left") { width = width / node.list.length } if (node.meta.style == "span") { width = width / node.list.length }
can.core.List(node.list, function(node) { can.onimport._item(can, node, ui.list, width) }) can.core.List(node.list, function(node) { can.onimport._item(can, node, ui.list, width) })
return ui.item return ui.item
}, },