diff --git a/build/vite/plugin/index.ts b/build/vite/plugin/index.ts index 81de12d3..06445b64 100644 --- a/build/vite/plugin/index.ts +++ b/build/vite/plugin/index.ts @@ -2,6 +2,8 @@ import vue from '@vitejs/plugin-vue' import vueJsx from '@vitejs/plugin-vue-jsx' +import windiCSS from 'vite-plugin-windicss' + import type { Plugin, ConfigEnv } from 'vite' // 按需加载样式配置 @@ -19,6 +21,9 @@ import { configMockPlugin } from './mock' export function createVitePlugins(isBuild = false, _configEnv: ConfigEnv) { const vitePlugins: (Plugin | Plugin[])[] = [vue(), vueJsx()] + + vitePlugins.push(windiCSS()) + vitePlugins.push(configStylePlugin()) vitePlugins.push(configThemePlugin()) diff --git a/package.json b/package.json index bd734316..303ab579 100644 --- a/package.json +++ b/package.json @@ -82,6 +82,7 @@ "vite-plugin-mock": "^2.9.6", "vite-plugin-style-import": "^1.4.0", "vite-plugin-svg-icons": "^1.0.5", + "vite-plugin-windicss": "^1.6.1", "vue-tsc": "^0.29.8" }, "license": "MIT", diff --git a/src/layouts/components/Sidebar/index.vue b/src/layouts/components/Sidebar/index.vue index f289ef52..a37c7225 100644 --- a/src/layouts/components/Sidebar/index.vue +++ b/src/layouts/components/Sidebar/index.vue @@ -40,6 +40,7 @@ const activeMenyu = computed(() => { if (meta.activeMenu) { return meta.activeMenu } + console.log(path) return path }) diff --git a/src/main.ts b/src/main.ts index 6746864e..19a5b30b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -2,6 +2,12 @@ import { createApp } from 'vue' import App from './App.vue' +import 'virtual:windi-base.css' +// import 'virtual:windi-components.css' +// import 'virtual:windi-utilities.css' +// Register icon sprite +// import 'virtual:svg-icons-register' + import { configMainElementPlus, configMainGlobalProperties, diff --git a/src/router/modules/otherRoute/otherRoute.ts b/src/router/modules/otherRoute/otherRoute.ts index be0aa3d9..1b0ccdc3 100644 --- a/src/router/modules/otherRoute/otherRoute.ts +++ b/src/router/modules/otherRoute/otherRoute.ts @@ -11,7 +11,7 @@ const safeManagerRoutes: Array = [ { path: '/useradmin', component: Layout, - redirect: '/useradmin/userlist', + redirect: '/useradmin/userlist/', name: '用户管理', alwaysShow: true, meta: { title: t('route.pathName.userInfo'), icon: 'iEL-avatar' }, @@ -43,7 +43,7 @@ const safeManagerRoutes: Array = [ { path: '/nested', component: Layout, - redirect: '/nested/menu1', + redirect: '/nested/menu1/', name: 'Nested', meta: { title: t('route.pathName.nested'), @@ -54,7 +54,7 @@ const safeManagerRoutes: Array = [ path: 'menu1', component: AppMain, // Parent router-view name: 'Menu1', - redirect: '/nested/menu1/menu1-1', + redirect: '/nested/menu1/menu1-1/', meta: { title: t('route.pathName.nested1') }, children: [ { @@ -67,7 +67,7 @@ const safeManagerRoutes: Array = [ path: 'menu1-2', component: AppMain, name: 'Menu1-2', - redirect: '/nested/menu1/menu1-2/menu1-2-1', + redirect: '/nested/menu1/menu1-2/menu1-2-1/', meta: { title: t('route.pathName.nested1_2') }, children: [ { diff --git a/src/styles/variables-day.scss b/src/styles/variables-day.scss index 7ac44b11..eeb665e6 100644 --- a/src/styles/variables-day.scss +++ b/src/styles/variables-day.scss @@ -1,6 +1,7 @@ // 统一颜色主题 $mianColor: #409eff; //主色 -$subColor: #ecf5ff; //灰色 +$subColor: #a5cfff; //浅蓝1 +$subColor1: #ecf5ff; //浅蓝2 // 左侧导航栏 $sideBarWidth: 210px; @@ -20,7 +21,7 @@ $menuItemText: #909399; //二级文字颜色 $menuItemHover: #f3f3f3; //二级焦点背景颜色 $menuItemHoverText: $mianColor; //二级焦点文字颜色 $menuItemActiveText: $mianColor; -$menuItemActiveBg: $subColor; //二级选中背景颜色 +$menuItemActiveBg: $subColor1; //二级选中背景颜色 $menuItemActiveBorderLeft: $mianColor; //二级左描边背景颜色 $appMainBgColor: #f5f6fa; //app-mian背景颜色 diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 42b48c6a..83fbf262 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -1,13 +1,13 @@