diff --git a/.eslintrc.js b/.eslintrc.js index 8c7c5db..3a19ec9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -25,7 +25,7 @@ module.exports = { 'vue/multi-word-component-names': 'off', 'vue/comment-directive': 'off', 'no-console': 'off', - 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', + 'no-debugger': import.meta.env.MODE === 'production' ? 'warn' : 'off', '@typescript-eslint/ban-types': 'off', '@typescript-eslint/explicit-module-boundary-types': 'off', '@typescript-eslint/member-delimiter-style': [ diff --git a/package.json b/package.json index 195c6bf..64f6af8 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "lodash-es": "^4.17.21", "normalize.css": "^8.0.1", "nprogress": "^0.2.0", + "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.0", "pinia": "^2.0.13", "screenfull": "^6.0.1", @@ -30,6 +31,7 @@ "@types/lodash-es": "^4.17.6", "@types/node": "^17.0.25", "@types/nprogress": "^0.2.0", + "@types/path-browserify": "^1.0.0", "@typescript-eslint/eslint-plugin": "^5.20.0", "@typescript-eslint/parser": "^5.20.0", "@vitejs/plugin-vue": "^2.3.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1aad6f6..863407b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,6 +6,7 @@ specifiers: '@types/lodash-es': ^4.17.6 '@types/node': ^17.0.25 '@types/nprogress': ^0.2.0 + '@types/path-browserify': ^1.0.0 '@typescript-eslint/eslint-plugin': ^5.20.0 '@typescript-eslint/parser': ^5.20.0 '@vitejs/plugin-vue': ^2.3.1 @@ -24,6 +25,7 @@ specifiers: lodash-es: ^4.17.21 normalize.css: ^8.0.1 nprogress: ^0.2.0 + path-browserify: ^1.0.1 path-to-regexp: ^6.2.0 pinia: ^2.0.13 sass: ^1.50.1 @@ -46,6 +48,7 @@ dependencies: lodash-es: 4.17.21 normalize.css: 8.0.1 nprogress: 0.2.0 + path-browserify: 1.0.1 path-to-regexp: 6.2.0 pinia: 2.0.13_typescript@4.6.3+vue@3.2.33 screenfull: 6.0.1 @@ -57,6 +60,7 @@ devDependencies: '@types/lodash-es': 4.17.6 '@types/node': 17.0.25 '@types/nprogress': 0.2.0 + '@types/path-browserify': 1.0.0 '@typescript-eslint/eslint-plugin': 5.20.0_b9ac9b5656ce5dffade639fcf5e491bf '@typescript-eslint/parser': 5.20.0_eslint@8.13.0+typescript@4.6.3 '@vitejs/plugin-vue': 2.3.1_vite@2.9.5+vue@3.2.33 @@ -208,6 +212,10 @@ packages: resolution: {integrity: sha512-1cYJrqq9GezNFPsWTZpFut/d4CjpZqA0vhqDUPFWYKF1oIyBz5qnoYMzR+0C/T96t3ebLAC1SSnwrVOm5/j74A==} dev: true + /@types/path-browserify/1.0.0: + resolution: {integrity: sha512-XMCcyhSvxcch8b7rZAtFAaierBYdeHXVvg2iYnxOV0MCQHmPuRRmGZPFDRzPayxcGiiSL1Te9UIO+f3cuj0tfw==} + dev: true + /@types/svgo/2.6.3: resolution: {integrity: sha512-5sP0Xgo0dXppY0tbYF6TevB/1+tzFLuu71XXxC/zGvQAn9PW7y+DwtDO81g0ZUPye00K6tPwtsLDOpARa0mFcA==} dependencies: @@ -2813,6 +2821,10 @@ packages: engines: {node: '>=0.10.0'} dev: true + /path-browserify/1.0.1: + resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} + dev: false + /path-exists/3.0.0: resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} engines: {node: '>=4'} diff --git a/src/components/SvgIcon/index.vue b/src/components/SvgIcon/index.vue index 52e985c..28d77a6 100644 --- a/src/components/SvgIcon/index.vue +++ b/src/components/SvgIcon/index.vue @@ -1,6 +1,6 @@ @@ -15,10 +15,6 @@ const props = defineProps({ name: { type: String, required: true - }, - color: { - type: String, - default: '#333' } }) diff --git a/src/layout/components/NavigationBar/index.vue b/src/layout/components/NavigationBar/index.vue index f5b774a..6b96d4a 100644 --- a/src/layout/components/NavigationBar/index.vue +++ b/src/layout/components/NavigationBar/index.vue @@ -39,8 +39,8 @@ import { useRouter } from 'vue-router' import { useAppStore } from '@/store/modules/app' import { useSettingsStore } from '@/store/modules/settings' import { useUserStore } from '@/store/modules/user' -import BreadCrumb from '../bread-crumb/index.vue' -import Hamburger from '../hamburger/index.vue' +import BreadCrumb from '../BreadCrumb/index.vue' +import Hamburger from '../Hamburger/index.vue' import ThemeSwitch from '@/components/ThemeSwitch/index.vue' import Screenfull from '@/components/Screenfull/index.vue' diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 24de9ec..95235d8 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -31,11 +31,11 @@