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 + +