From ea2eddb4c3a6be836047568d6d26b0142eace8a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= Date: Wed, 25 Dec 2024 09:38:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=87=8D=E6=9E=84=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E6=96=87=E4=BB=B6=EF=BC=8C=E5=88=A0=E9=99=A4=E4=B8=8D=E5=BF=85?= =?UTF-8?q?=E8=A6=81=E7=9A=84=E6=A0=B7=E5=BC=8F=E5=B9=B6=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/styles/main.less | 16 --------- src/layouts/default-layout.vue | 19 ----------- src/main.ts | 2 +- .../data-loaders.[id]/sub-1.[userId].page.vue | 5 +++ src/{assets => }/styles/base.css | 0 src/{assets => }/styles/index.ts | 4 +-- src/styles/main.less | 34 +++++++++++++++++++ src/{assets => }/styles/reset-primevue.css | 0 vite.config.plugins.ts | 2 +- 9 files changed, 43 insertions(+), 39 deletions(-) delete mode 100644 src/assets/styles/main.less rename src/{assets => }/styles/base.css (100%) rename src/{assets => }/styles/index.ts (100%) create mode 100644 src/styles/main.less rename src/{assets => }/styles/reset-primevue.css (100%) diff --git a/src/assets/styles/main.less b/src/assets/styles/main.less deleted file mode 100644 index 6445509..0000000 --- a/src/assets/styles/main.less +++ /dev/null @@ -1,16 +0,0 @@ -#app { - max-width: 1280px; - margin: 0 auto; - padding: 1rem; - font-weight: normal; -} - -.green { - text-decoration: none; - color: hsla(160, 100%, 37%, 1); - transition: 0.4s; - padding: 3px; -} -.green:hover { - background-color: hsla(160, 100%, 37%, 0.2); -} diff --git a/src/layouts/default-layout.vue b/src/layouts/default-layout.vue index dd56008..b006a3f 100644 --- a/src/layouts/default-layout.vue +++ b/src/layouts/default-layout.vue @@ -4,22 +4,3 @@ - - diff --git a/src/main.ts b/src/main.ts index f9836d6..1847867 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,4 +1,4 @@ -import './assets/styles'; +import './styles'; import App from './App.vue'; diff --git a/src/pages/data-loaders.[id]/sub-1.[userId].page.vue b/src/pages/data-loaders.[id]/sub-1.[userId].page.vue index b70de5c..a01c4fa 100644 --- a/src/pages/data-loaders.[id]/sub-1.[userId].page.vue +++ b/src/pages/data-loaders.[id]/sub-1.[userId].page.vue @@ -181,3 +181,8 @@ code { } } + + +meta: + layout: second + diff --git a/src/assets/styles/base.css b/src/styles/base.css similarity index 100% rename from src/assets/styles/base.css rename to src/styles/base.css diff --git a/src/assets/styles/index.ts b/src/styles/index.ts similarity index 100% rename from src/assets/styles/index.ts rename to src/styles/index.ts index abf001b..3d4f0e2 100644 --- a/src/assets/styles/index.ts +++ b/src/styles/index.ts @@ -1,9 +1,9 @@ import 'nprogress/nprogress.css'; // -import './main.less'; - import '@unocss/reset/tailwind-compat.css'; // https://unocss.dev/guide/style-reset#tailwind-compat // +import './main.less'; + import 'primeicons/primeicons.css'; import './reset-primevue.css'; diff --git a/src/styles/main.less b/src/styles/main.less new file mode 100644 index 0000000..40e68d3 --- /dev/null +++ b/src/styles/main.less @@ -0,0 +1,34 @@ +#app { + max-width: 1280px; + margin: 0 auto; + padding: 1rem; + font-weight: normal; +} + +.green { + text-decoration: none; + color: hsla(160, 100%, 37%, 1); + transition: 0.4s; + padding: 3px; +} +.green:hover { + background-color: hsla(160, 100%, 37%, 0.2); +} + + +.layout-tip { + position: fixed; + top: 1rem; + left: 50%; + transform: translateX(-50%); + z-index: 9999; + background-color: #fafafa; + border: 1px solid #ccc; + padding: 1rem; + border-radius: 0.5rem; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); + text-transform: uppercase; + opacity: 0.8; + background: rgba(255, 255, 255, 0.5); /* 半透明白色背景 */ + backdrop-filter: blur(5px); /* 背景模糊 */ +} \ No newline at end of file diff --git a/src/assets/styles/reset-primevue.css b/src/styles/reset-primevue.css similarity index 100% rename from src/assets/styles/reset-primevue.css rename to src/styles/reset-primevue.css diff --git a/vite.config.plugins.ts b/vite.config.plugins.ts index 7f26209..742b136 100644 --- a/vite.config.plugins.ts +++ b/vite.config.plugins.ts @@ -51,7 +51,7 @@ export function Plugins() { // https://github.com/JohnCampionJr/vite-plugin-vue-layouts?tab=readme-ov-file#configuration Layouts({ defaultLayout: 'default-layout', - pagesDirs: ['src/pages'], + pagesDirs: [], }), // https://github.com/antfu/unocss