1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 16:58:06 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-01-21 17:02:03 +08:00
parent 66dda357b1
commit d1bc801c7b
2 changed files with 3 additions and 3 deletions

View File

@ -87,7 +87,7 @@ Volcanos("user", {
toast: function(can, content, title, duration, progress, caller) { toast: function(can, content, title, duration, progress, caller) {
content = {"success": "✅ success", "failure": "❌ failure", "process": "🕑 process"}[content]||content content = {"success": "✅ success", "failure": "❌ failure", "process": "🕑 process"}[content]||content
var meta = can.base.isObject(content)? content: {content: content, duration: duration, progress: progress, caller: caller} var meta = can.base.isObject(content)? content: {content: content, duration: duration, progress: progress, caller: caller}
meta.title = meta.title||can.core.Keys(can.Conf(web.SPACE), can.Conf(ctx.INDEX))||can._name.split(nfs.PS).slice(-2).join(nfs.PS) meta.title = meta.title||can.core.Keys(can.ConfSpace(), can.ConfIndex())||can._name.split(nfs.PS).slice(-2).join(nfs.PS)
var width = meta.width||380; if (width < 0) { width = window.innerWidth + width } meta.action = meta.action||[""] var width = meta.width||380; if (width < 0) { width = window.innerWidth + width } meta.action = meta.action||[""]
var ui = can.page.Append(can, document.body, [{view: [[chat.TOAST, chat.FLOAT]], style: {left: (window.innerWidth-width)/2, width: width, top: can.page.height()/2}, list: [ var ui = can.page.Append(can, document.body, [{view: [[chat.TOAST, chat.FLOAT]], style: {left: (window.innerWidth-width)/2, width: width, top: can.page.height()/2}, list: [
{text: [meta.title||"", html.DIV, html.TITLE], title: "点击复制", onclick: function(event) { can.user.copy(event, can, meta.title) }}, {text: [meta.title||"", html.DIV, html.TITLE], title: "点击复制", onclick: function(event) { can.user.copy(event, can, meta.title) }},

View File

@ -43,7 +43,7 @@ Volcanos(chat.ONIMPORT, {
(sub._rich_list = sub._rich_list||[]).push(msg); if (sub._rich_list.length > 1) { return } (sub._rich_list = sub._rich_list||[]).push(msg); if (sub._rich_list.length > 1) { return }
} }
var height = can.onexport.outputHeight(can) var height = can.onexport.outputHeight(can)
can.onappend.plugin(can, {title: msg.Option(ice.MSG_TITLE)||"table.js", index: "can._filter", height: height, style: "rich"}, function(sub) { can.onappend.plugin(can, {title: can.core.Keys(can.ConfSpace(), msg.Option(ice.MSG_TITLE)||"table.js"), index: "can._filter", height: height, style: "rich"}, function(sub) {
sub.onexport.output = function() { can.sub._rich = sub.sub, _rich(), can.onmotion.scrollIntoView(can, sub._target) } sub.onexport.output = function() { can.sub._rich = sub.sub, _rich(), can.onmotion.scrollIntoView(can, sub._target) }
}); return }); return
}, },
@ -66,7 +66,7 @@ Volcanos(chat.ONIMPORT, {
(can.sub._grow_list = can.sub._grow_list||[]).push(msg); if (can.sub._grow_list.length > 1) { return } (can.sub._grow_list = can.sub._grow_list||[]).push(msg); if (can.sub._grow_list.length > 1) { return }
} }
var height = can.onexport.outputHeight(can) var height = can.onexport.outputHeight(can)
can.onappend.plugin(can, {title: msg.Option(ice.MSG_TITLE)||msg.Option(ctx.DISPLAY).split(nfs.PS).pop(), index: "can._filter", display: msg.Option(ctx.DISPLAY), height: height}, function(sub) { can.onappend.plugin(can, {title: can.core.Keys(can.ConfSpace(), msg.Option(ice.MSG_TITLE)||msg.Option(ctx.DISPLAY).split(nfs.PS).pop()), index: "can._filter", display: msg.Option(ctx.DISPLAY), height: height}, function(sub) {
sub.onexport.output = function() { can.onmotion.scrollIntoView(can, sub._target), can.sub._grow = sub.sub, _grow() } sub.onexport.output = function() { can.onmotion.scrollIntoView(can, sub._target), can.sub._grow = sub.sub, _grow() }
}); return }); return
} }