From 850dd75822518627a1ea97764ce7cd0237a63fa7 Mon Sep 17 00:00:00 2001 From: snowy Date: Thu, 1 Aug 2024 12:23:56 +0800 Subject: [PATCH] =?UTF-8?q?:memo:=20=E6=96=B0=E5=A2=9E=E5=85=A8=E7=90=83?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/.vuepress/client.js | 7 ++++- docs/.vuepress/components/Dash.vue | 38 ++++++++++++++++++++++++++++ docs/.vuepress/config.ts | 1 + docs/.vuepress/public/js/get_data.js | 1 + docs/.vuepress/public/js/style.js | 13 ++++++++-- docs/README.md | 30 +++++++++++++++++++++- docs/store/resource.md | 3 ++- 7 files changed, 88 insertions(+), 5 deletions(-) create mode 100644 docs/.vuepress/components/Dash.vue create mode 100644 docs/.vuepress/public/js/get_data.js diff --git a/docs/.vuepress/client.js b/docs/.vuepress/client.js index f4472028..d74dd557 100644 --- a/docs/.vuepress/client.js +++ b/docs/.vuepress/client.js @@ -1,11 +1,16 @@ import {defineClientConfig} from "vuepress/client"; + import resourceStoreComp from "./components/ResStore.vue"; import pluginStoreComp from "./components/PluginStore.vue"; -//导入element-plus +import dashComp from "./components/Dash.vue"; + + import ElementPlus from 'element-plus'; + export default defineClientConfig({ enhance: ({app, router, siteData}) => { + app.component("dashComp", dashComp); app.component("resourceStoreComp", resourceStoreComp); app.component("pluginStoreComp", pluginStoreComp); app.use(ElementPlus); diff --git a/docs/.vuepress/components/Dash.vue b/docs/.vuepress/components/Dash.vue new file mode 100644 index 00000000..f1c752af --- /dev/null +++ b/docs/.vuepress/components/Dash.vue @@ -0,0 +1,38 @@ + + + + + \ No newline at end of file diff --git a/docs/.vuepress/config.ts b/docs/.vuepress/config.ts index b3273d8f..264b04e8 100644 --- a/docs/.vuepress/config.ts +++ b/docs/.vuepress/config.ts @@ -11,6 +11,7 @@ export default defineUserConfig({ head: [ // 设置 favor.ico,.vuepress/public 下 ["script", {src: "/js/style.js", "type": "module"}], + ["script", {src: "/js/get_data.js", "type": "module"}], ['link', {rel: 'icon', href: 'https://cdn.liteyuki.icu/favicon.ico'},], ['link', {rel: 'stylesheet', href: 'https://cdn.bootcdn.net/ajax/libs/firacode/6.2.0/fira_code.min.css'}], diff --git a/docs/.vuepress/public/js/get_data.js b/docs/.vuepress/public/js/get_data.js new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/docs/.vuepress/public/js/get_data.js @@ -0,0 +1 @@ + diff --git a/docs/.vuepress/public/js/style.js b/docs/.vuepress/public/js/style.js index e73b0ddf..58c36d9a 100644 --- a/docs/.vuepress/public/js/style.js +++ b/docs/.vuepress/public/js/style.js @@ -1,10 +1,15 @@ function applyStyle() { + // 先检测页面中是否有macos-tab,有则不再添加 + let tabs = document.body.querySelectorAll('.macos-tab') + if (tabs.length > 0) { + return + } let lineNumbers = document.body.querySelectorAll('[class^="language-"].line-numbers-mode') lineNumbers.forEach((item) => { // 插入现成的html文本 let title = item.getAttribute('data-title') let tabStr = - "
" + + "
" + "
" + "
" + "
" + @@ -19,4 +24,8 @@ function applyStyle() { } -applyStyle() \ No newline at end of file +applyStyle() +// 定时器,每隔1s检查一次 +setInterval(() => { + applyStyle() +}, 1000) \ No newline at end of file diff --git a/docs/README.md b/docs/README.md index 03d99987..07671dff 100644 --- a/docs/README.md +++ b/docs/README.md @@ -9,7 +9,7 @@ bgImageDark: bgImageStyle: background-attachment: fixed heroText: LiteyukiBot -tagline: LiteyukiBot 轻雪机器人,基于NoneBot2构建的综合应用型聊天机器人 +tagline: LiteyukiBot 轻雪机器人,基于NoneBot2构建的综合应用型聊天机器人

总实例:0    当前在线:0

actions: - text: 快速部署 @@ -79,4 +79,32 @@ highlights: details: 如果你有多个 Python 环境,请使用 pythonx -m pip install -r requirements.txt。 - title: 使用 python main.py 启动项目。 copyright: © 2021-2024 SnowyKami All Rights Reserved + --- + \ No newline at end of file diff --git a/docs/store/resource.md b/docs/store/resource.md index 32a21fa0..ec2bdbb1 100644 --- a/docs/store/resource.md +++ b/docs/store/resource.md @@ -4,4 +4,5 @@ icon: box order: 1 category: 使用手册 --- - \ No newline at end of file + +