From 6f95d74d9f64c9f3e37a52c2e4f5b1c85378d62b Mon Sep 17 00:00:00 2001 From: camera-2018 <2907618001@qq.com> Date: Thu, 27 Jul 2023 04:15:05 +0800 Subject: [PATCH] feat: View_Transitions_API --- .../components/CustomSwitchAppearance.vue | 183 ++++++++++++++++++ .vitepress/config.js | 13 ++ 2 files changed, 196 insertions(+) create mode 100644 .vitepress/components/CustomSwitchAppearance.vue diff --git a/.vitepress/components/CustomSwitchAppearance.vue b/.vitepress/components/CustomSwitchAppearance.vue new file mode 100644 index 0000000..55c7673 --- /dev/null +++ b/.vitepress/components/CustomSwitchAppearance.vue @@ -0,0 +1,183 @@ + + + + + + + \ No newline at end of file diff --git a/.vitepress/config.js b/.vitepress/config.js index 3708412..e71f13f 100644 --- a/.vitepress/config.js +++ b/.vitepress/config.js @@ -7,6 +7,7 @@ import PanguPlugin from 'markdown-it-pangu' import { createWriteStream } from 'node:fs' import { resolve } from 'node:path' import { SitemapStream } from 'sitemap' +import { fileURLToPath, URL } from 'node:url' const links = [] @@ -175,5 +176,17 @@ export default withMermaid({ sitemap.end() await new Promise((r) => writeStream.on('finish', r)) }, + vite: { + resolve: { + alias: [ + { + find: /^.*\/VPSwitchAppearance\.vue$/, + replacement: fileURLToPath( + new URL('./components/CustomSwitchAppearance.vue', import.meta.url) + ) + } + ] + } + } })