diff --git a/.vscode/settings.json b/.vscode/settings.json index 54be7d8c..7d8aed49 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -83,7 +83,8 @@ "editor.defaultFormatter": "esbenp.prettier-vscode" }, "editor.codeActionsOnSave": { - "source.fixAll.eslint": "explicit" + "source.fixAll.eslint": "explicit", + "source.fixAll.stylelint": "explicit" }, "[vue]": { "editor.defaultFormatter": "rvest.vs-code-prettier-eslint" diff --git a/src/components/DictTag/src/DictTag.vue b/src/components/DictTag/src/DictTag.vue index 23d84b2a..8835774f 100644 --- a/src/components/DictTag/src/DictTag.vue +++ b/src/components/DictTag/src/DictTag.vue @@ -72,7 +72,7 @@ export default defineComponent({ // 添加标签的文字颜色为白色,解决自定义背景颜色时标签文字看不清的问题 diff --git a/src/layout/components/TagsView/src/TagsView.vue b/src/layout/components/TagsView/src/TagsView.vue index 7db0cf6f..01610968 100644 --- a/src/layout/components/TagsView/src/TagsView.vue +++ b/src/layout/components/TagsView/src/TagsView.vue @@ -358,12 +358,13 @@ watch( > diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index ef79752f..bf2ba2bb 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -593,6 +593,16 @@ const remainingRouter: AppRouteRecordRaw[] = [ } } ] + }, + { + path: '/:pathMatch(.*)*', + component: () => import('@/views/Error/404.vue'), + name: '', + meta: { + title: '404', + hidden: true, + breadcrumb: false + } } ] diff --git a/src/store/modules/permission.ts b/src/store/modules/permission.ts index 5e3287a7..fc927f42 100644 --- a/src/store/modules/permission.ts +++ b/src/store/modules/permission.ts @@ -40,10 +40,12 @@ export const usePermissionStore = defineStore('permission', { } const routerMap: AppRouteRecordRaw[] = generateRoute(res) // 动态路由,404一定要放到最后面 + // preschooler:vue-router@4以后已支持静态404路由,此处可不再追加 this.addRouters = routerMap.concat([ { path: '/:path(.*)*', - redirect: '/404', + // redirect: '/404', + component: () => import('@/views/Error/404.vue'), name: '404Page', meta: { hidden: true, diff --git a/src/styles/index.scss b/src/styles/index.scss index fbe76f23..766f983e 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -1,5 +1,6 @@ @import './var.css'; @import './FormCreate/index.scss'; +@import './theme.scss'; @import 'element-plus/theme-chalk/dark/css-vars.css'; .reset-margin [class*='el-icon'] + span { diff --git a/src/styles/theme.scss b/src/styles/theme.scss index 39b03b3d..149002cf 100644 --- a/src/styles/theme.scss +++ b/src/styles/theme.scss @@ -4,3 +4,14 @@ // .dark .dark\:text-color { // color: rgba(255, 255, 255, var(--dark-text-color)); // } + +// 登录页 +.dark .login-form { + .el-divider__text { + background-color: var(--login-bg-color); + } + + .el-card { + background-color: var(--login-bg-color); + } +} diff --git a/src/views/Login/Login.vue b/src/views/Login/Login.vue index 5d349ce3..e1245757 100644 --- a/src/views/Login/Login.vue +++ b/src/views/Login/Login.vue @@ -5,7 +5,7 @@ >
@@ -27,7 +27,9 @@
-