1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 08:48:06 +08:00

opt dream

This commit is contained in:
harveyshao 2022-11-18 21:59:31 +08:00
parent a16a560319
commit c441f340ae
2 changed files with 5 additions and 4 deletions

View File

@ -220,7 +220,7 @@ Volcanos(chat.ONPLUGIN, {
plugin: shy("默认插件", [mdb.NAME, ice.LIST, ice.BACK]),
layout: shy("界面布局", {
_init: function(can) {
can.Option(chat.LAYOUT, can.getAction(chat.LAYOUT))
can.Option(chat.LAYOUT, can.getAction(chat.LAYOUT)||ice.AUTO)
},
}, ["layout:select=auto,tabs,tabview,horizon,vertical,free,grid,flow,page", ice.RUN], function(can, msg, arg) { can.onaction.layout(can, arg[0], true) }),

View File

@ -33,7 +33,8 @@ Volcanos(chat.ONIMPORT, {_process: function(can, msg) {
sub.run = function(event, cmds, cb) {
var res = can.request(event, can.Option(), opts, {pid: msg.Option("pid")})
for (var i = 0; i < opt.length; i += 2) { res.Option(opt[i], opt[i+1]) }
can.run(event, (msg.Option("_index")==can._index? []: [ice.RUN, msg.Option("_index")]).concat(msg[ice.MSG_PREFIX]||[]).concat(cmds), cb, true)
// can.run(event, (msg.Option("_index")==can._index? []: [ice.RUN, msg.Option("_index")]).concat(msg[ice.MSG_PREFIX]||[]).concat(cmds), cb, true)
can.run(event, (msg.Option("_index")==can._index? msg[ice.MSG_PREFIX]||[]: [ice.RUN, msg.Option("_index")]).concat(cmds), cb, true)
}
}) }); return true
},
@ -116,8 +117,8 @@ Volcanos(chat.ONACTION, {list: [
_resize: function(can, auto, height, width) { can.onimport.size(can, height, width, auto) },
_output: function(can, msg) {},
"刷新界面": function(event, can, button, sub) { sub.onlayout._init(sub) },
"刷新数据": function(event, can) { can.Update(event, can.Input()) },
"刷新界面": function(event, can, button, sub) { sub.onlayout._init(sub), can.user.toastSuccess(can) },
"刷新数据": function(event, can) { can.Update(event, can.Input()), can.user.toastSuccess(can) },
"切换浮动": function(event, can, button, sub) {
can.onaction._switch(can, sub, chat.FLOAT, function() { can.onmotion.hidden(can, can._action), can.onmotion.hidden(can, can._status)
can.ConfHeight(can.page.height()/2-2*html.ACTION_HEIGHT-can.onexport.statusHeight(can)), html.WIDTH, can.ConfWidth(can.page.width()/(can.user.isMobile? 1: 2))