From 05a1ed42e223c0761db8a99107603f45ed18a628 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=89=E8=8F=9C?= <1659488338@qq.com> Date: Wed, 13 Mar 2024 09:05:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=96=87=E6=A1=A3=E9=83=A8=E7=BD=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/.vitepress/config.mts | 2 +- test/plugins/test.ts | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 8ea4d4e4..ed16dc10 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -4,7 +4,7 @@ export default defineConfigWithTheme({ title: '知音(Zhin)', titleTemplate: ':title - 知音(Zhin)', head: [['meta', {name: 'theme-color', content: '#3c8772'}]], - srcDir: './node', + srcDir: './src', outDir: './dist', description: '轻量、优雅的开发机器人', lang: 'zh-CN', diff --git a/test/plugins/test.ts b/test/plugins/test.ts index c32e47d7..b6175aea 100644 --- a/test/plugins/test.ts +++ b/test/plugins/test.ts @@ -48,7 +48,7 @@ test.mounted(() => { test.component({ name: 'test2', render(_, context) { - return `,我在这儿`; + return `,一天天的就知道钓鱼,该上学上学,该上班上班`; }, }); test.component({ @@ -60,9 +60,13 @@ test.mounted(() => { }, }, render(props, context) { - return `hello!${context.who}`; + return `不务正业!${context.who}`; }, }); }); -test.command('钓鱼').action(() => '一天天的就知道钓鱼,该上学上学,该上班上班'); +test + .command('钓鱼') + .alias('🎣') + .sugar(/^.(钓鱼)|(🎣)$/) + .action(({ message }) => ``); export default test;