From 5f202a293e4798889c9a48e6679cadb47d22d21d Mon Sep 17 00:00:00 2001 From: shy Date: Fri, 16 Aug 2024 07:53:31 +0800 Subject: [PATCH] add some --- frame.js | 3 ++- lib/base.js | 2 +- plugin/table.js | 8 +++----- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/frame.js b/frame.js index 0bb63623..edf08843 100644 --- a/frame.js +++ b/frame.js @@ -33,7 +33,8 @@ Volcanos(chat.ONENGINE, { names = can.base.MergeURL(names, ice.MSG_INDEX, sub.ConfIndex()), can.page.exportValue(sub, msg) can.onengine.signal(panel, chat.ONREMOTE, can.request({}, {_follow: panel._follow, _msg: msg, _cmds: cmds, names: names})) can.misc.Run(event, can, {names: names}, cmds, function(msg) { - toast && can.user.toastSuccess(msg._can, msg.Option(ctx.ACTION)+lex.SP+ice.SUCCESS), toast && toast.close && toast.close(), toast = true + // toast && can.user.toastSuccess(msg._can, msg.Option(ctx.ACTION)+lex.SP+ice.SUCCESS) + toast && toast.close && toast.close(), toast = true can.base.isFunc(cb) && cb(msg), Volcanos.meta.pack[can.core.Keys(panel._name, cmds.join(mdb.FS))] = msg }) }, diff --git a/lib/base.js b/lib/base.js index bbf173d3..1591e738 100644 --- a/lib/base.js +++ b/lib/base.js @@ -95,7 +95,7 @@ Volcanos("base", { for (var i = 0; i < list.length; i++) { var yestoday = this.Time(new Date(now - (i+1)*24*60*60*1000), "%y-%m-%d ") if (value.indexOf(yestoday) == 0) { - prefix = (list[i] || ["周日", "周一", "周二", "周三", "周四", "周五", "周六", "周日"][new Date(value).getDay()])+" ", pre = yestoday; break + prefix = (list[i] || ["周日", "周一", "周二", "周三", "周四", "周五", "周六", "周日"][new Date(value.replaceAll("-", "/")).getDay()])+" ", pre = yestoday; break } } } diff --git a/plugin/table.js b/plugin/table.js index e81e8e3e..cca101d7 100644 --- a/plugin/table.js +++ b/plugin/table.js @@ -14,10 +14,9 @@ Volcanos(chat.ONIMPORT, { can.onappend.table(can, msg, null, target), can.onappend.board(can, msg, target), can.onmotion.story.auto(can, target) } cb && cb(msg) }, + textView: function(can, value, key, type) { return value[key] && {text: [can.user.transValue(can, value, key), "", [type, value[key], can.Conf("_trans.value."+key+".style."+value[key])||""]]} }, itemcards: function(can, msg, cb) { - if (msg.IsDetail()) { var value = msg.TableDetail() - msg.Show(can) - // can.page.Append(can, can._output, [can.onimport.itemcard(can, value, cb(value))]) + if (msg.IsDetail()) { var value = msg.TableDetail(); msg.Show(can) can.page.Select(can, can._output, html.TR, function(target) { if (target.className.indexOf("_uid") > -1) { can.page.ClassList.add(can, target, "hide") @@ -26,8 +25,7 @@ Volcanos(chat.ONIMPORT, { } else { can.page.Append(can, can._output, msg.Table(function(value) { return can.onimport.itemcard(can, value, cb(value)) - })) - msg.Result() && can.onappend.board(can, msg) + })), msg.Result() && can.onappend.board(can, msg) } }, itemcard: function(can, value, list, cb) {