mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
opt some
This commit is contained in:
parent
95263f0fc6
commit
d2cb2da98a
5
frame.js
5
frame.js
@ -317,7 +317,7 @@ Volcanos("onappend", {help: "渲染引擎", list: [], _init: function(can, meta,
|
|||||||
}
|
}
|
||||||
|
|
||||||
meta.style && sub.page.Modify(sub, sub._target, {style: meta.style})
|
meta.style && sub.page.Modify(sub, sub._target, {style: meta.style})
|
||||||
can.onmotion.float.add(can, "input", sub)
|
can.onmotion.float.add(can, chat.INPUT, sub)
|
||||||
on(event, sub, meta, cb, target)
|
on(event, sub, meta, cb, target)
|
||||||
}, document.body)
|
}, document.body)
|
||||||
}
|
}
|
||||||
@ -437,6 +437,9 @@ Volcanos("onlayout", {help: "页面布局", list: [], _init: function(can, targe
|
|||||||
if (top+target.offsetHeight>window.innerHeight-100) { top = window.innerHeight - target.offsetHeight - 100 }
|
if (top+target.offsetHeight>window.innerHeight-100) { top = window.innerHeight - target.offsetHeight - 100 }
|
||||||
|
|
||||||
var layout = {left: left, top: top}
|
var layout = {left: left, top: top}
|
||||||
|
if (layout.left < 0) { layout.left = 0 }
|
||||||
|
if (layout.top < 0) { layout.top = 0 }
|
||||||
|
|
||||||
can.page.Modify(can, target, {style: layout})
|
can.page.Modify(can, target, {style: layout})
|
||||||
can.onmotion.move(can, target, layout)
|
can.onmotion.move(can, target, layout)
|
||||||
},
|
},
|
||||||
|
@ -43,7 +43,9 @@ Volcanos("user", {help: "用户操作", agent: {
|
|||||||
return can.base.Time(time, (fmt||"%y-%m-%d %H:%M:%S").replace("%w", list[now.getDay()]))
|
return can.base.Time(time, (fmt||"%y-%m-%d %H:%M:%S").replace("%w", list[now.getDay()]))
|
||||||
},
|
},
|
||||||
|
|
||||||
title: function(text) { return text && (document.title = text), document.title },
|
title: function(text) {
|
||||||
|
return text && (document.title = text), document.title
|
||||||
|
},
|
||||||
topic: function(can, name) {
|
topic: function(can, name) {
|
||||||
can.user.isMobile && (name += " mobile") && can.user.isLandscape && (name += " landscape")
|
can.user.isMobile && (name += " mobile") && can.user.isLandscape && (name += " landscape")
|
||||||
can.page.Modify(can, document.body, {className: name})
|
can.page.Modify(can, document.body, {className: name})
|
||||||
|
@ -16,7 +16,7 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg,
|
|||||||
if (can.user.isMobile) { can._main_river = "product", can._main_storm = "office" }
|
if (can.user.isMobile) { can._main_river = "product", can._main_storm = "office" }
|
||||||
if (can.user.isWeiXin) { can._main_river = "service", can._main_storm = "wx" }
|
if (can.user.isWeiXin) { can._main_river = "service", can._main_storm = "wx" }
|
||||||
|
|
||||||
can._main_title = can.user.Search(can, chat.TITLE)||msg.Option(ice.MSG_TITLE)||Volcanos.meta.args.title||can.user.mod.isPod||can._main_title
|
can._main_title = can.user.Search(can, chat.TITLE)||msg.Option(ice.MSG_TITLE)||Volcanos.meta.args.title||can.user.Search(can, ice.POD)||can._main_title
|
||||||
can._main_river = can.user.Search(can, chat.RIVER)||msg.Option(ice.MSG_RIVER)||Volcanos.meta.args.river||can._main_river
|
can._main_river = can.user.Search(can, chat.RIVER)||msg.Option(ice.MSG_RIVER)||Volcanos.meta.args.river||can._main_river
|
||||||
can._main_storm = can.user.Search(can, chat.STORM)||msg.Option(ice.MSG_STORM)||Volcanos.meta.args.storm||can._main_storm
|
can._main_storm = can.user.Search(can, chat.STORM)||msg.Option(ice.MSG_STORM)||Volcanos.meta.args.storm||can._main_storm
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user