From 35e7c17b8500cd62e7563b1b9de7f564e2a15634 Mon Sep 17 00:00:00 2001 From: yoimiya-kokomi <592981798@qq.com> Date: Tue, 27 Sep 2022 11:05:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B8=AE=E5=8A=A9=E7=9A=AE?= =?UTF-8?q?=E8=82=A4=E4=B8=AD=E8=AE=BE=E7=BD=AE=E6=A8=A1=E7=B3=8A=E4=B8=BA?= =?UTF-8?q?0=E6=97=B6=E4=B8=8D=E7=94=9F=E6=95=88=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/help/theme.js | 2 +- components/App.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/help/theme.js b/apps/help/theme.js index 5c54418b..9234e03b 100644 --- a/apps/help/theme.js +++ b/apps/help/theme.js @@ -45,7 +45,7 @@ let Theme = { .help-table .td,.help-table .th{width:${100 / colCount}%} `] let css = function (sel, css, key, def, fn) { - let val = themeStyle[key] || diyStyle[key] || sysStyle[key] || def + let val = Data.def(themeStyle[key], diyStyle[key], sysStyle[key], def) if (fn) { val = fn(val) } diff --git a/components/App.js b/components/App.js index 5703d0b9..082e2751 100644 --- a/components/App.js +++ b/components/App.js @@ -93,6 +93,8 @@ class App { // v2执行方法 v2App (e) { + let cfg = this.cfg || {} + let event = cfg.event let apps = this.apps return async function (e) { let msg = e.original_msg || e.msg || '' @@ -114,6 +116,11 @@ class App { return true } } + } else if (event === 'poke' && msg === '#poke#') { + let ret = await app.fn(e, {}) + if (ret === true) { + return true + } } } return false