fix(layout): 更新移动侧边栏样式以支持深色模式
All checks were successful
CI/CD Pipeline / playwright (push) Successful in 4m22s
CI/CD Pipeline / build-and-deploy (push) Successful in 5m23s

This commit is contained in:
严浩
2025-10-21 23:09:59 +08:00
parent e54272b68b
commit 1afb28cb2b
4 changed files with 14 additions and 4 deletions

1
.env
View File

@@ -3,3 +3,4 @@ VITE_APP_BASE=/
VITE_APP_BUILD_SOURCE_MAP=true VITE_APP_BUILD_SOURCE_MAP=true
VITE_APP_BUILD_COMMIT= VITE_APP_BUILD_COMMIT=
VITE_APP_BUILD_TIME= VITE_APP_BUILD_TIME=
VITE_ENABLE_VUE_DEVTOOLS=true

View File

@@ -185,7 +185,7 @@ function handleClickMask() {
<!-- Mobile Sider --> <!-- Mobile Sider -->
<template v-if="showMobileSider"> <template v-if="showMobileSider">
<aside <aside
class="absolute left-0 top-0 h-full w-0 bg-white" class="absolute left-0 top-0 h-full w-0 bg-white dark:bg-gray-800"
:class="[ :class="[
commonClass, commonClass,
mobileSiderClass, mobileSiderClass,

View File

@@ -30,7 +30,13 @@ import { ViteWebfontDownload } from 'vite-plugin-webfont-dl';
import VueMacros from 'vue-macros/vite'; import VueMacros from 'vue-macros/vite';
import { IndexHtmlPlugin } from './vite.config.plugin.index-html-plugin'; import { IndexHtmlPlugin } from './vite.config.plugin.index-html-plugin';
export function Plugins({ mode }: { mode: string }): PluginOption[] { export function Plugins({
mode,
env,
}: {
mode: string;
env: Record<string, string>;
}): PluginOption[] {
const plugins: PluginOption[] = [ const plugins: PluginOption[] = [
VueMacros({ VueMacros({
plugins: { plugins: {
@@ -165,8 +171,11 @@ export function Plugins({ mode }: { mode: string }): PluginOption[] {
); );
} }
if (env.VITE_ENABLE_VUE_DEVTOOLS === 'true') {
plugins.push(vueDevTools());
}
plugins.push( plugins.push(
vueDevTools(),
// https://vite-plugin-checker.netlify.app/introduction/introduction.html // https://vite-plugin-checker.netlify.app/introduction/introduction.html
checker({ checker({
eslint: { eslint: {

View File

@@ -82,7 +82,7 @@ export default defineConfig(({ command, mode }) => {
}, },
}, },
}, },
plugins: Plugins({ mode }), plugins: Plugins({ mode, env }),
resolve: { resolve: {
alias: { alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)), '@': fileURLToPath(new URL('./src', import.meta.url)),