From 86920da61147c4ef0f908893be001df17606f4f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= Date: Wed, 10 Dec 2025 22:52:23 +0800 Subject: [PATCH] refactor: update component names to PascalCase and improve structure - Changed component names from kebab-case to PascalCase in various files for consistency. - Updated `` and `` to `` and `` respectively in App.vue and base-layout.vue. - Refactored AppNaiveUIProvider.vue to use PascalCase for Naive UI providers. - Adjusted language and theme switch buttons to use PascalCase for icon components. - Updated button components in demo pages to use PascalCase for Naive UI buttons. - Modified ESLint rules in route message files to use perfectionist/sort-objects for better key sorting. - Enhanced Vite plugin files to export loadPlugin functions for better plugin management. - Improved plugin loading logic to handle errors and warnings more effectively. --- .ignore | 3 + .vscode/settings.json | 41 ++++-- auto-imports.d.ts | 4 +- commitlint.config.ts | 4 +- eslint.config.ts | 29 +++- package.json | 4 +- pnpm-lock.yaml | 133 +++++++++++++++--- src/App.vue | 8 +- src/AppNaiveUIProvider.vue | 20 +-- .../components/LanguageSwitchButton.vue | 2 +- .../components/ThemeSwitchButton.vue | 6 +- .../components/ToggleSiderButton.vue | 4 +- .../components/UserDropdown.vue | 2 +- src/layouts/base-layout/the-base-layout.vue | 8 +- src/locales-utils/route-messages/en-US.ts | 7 +- src/locales-utils/route-messages/zh-CN.ts | 7 +- src/pages/demos/counter-demo.page.vue | 4 +- src/pages/demos/i18n-demo.page.vue | 28 ++-- src/pages/index.page.vue | 2 +- tsconfig.app.json | 7 + vite-plugins/00.vue-macros.ts | 40 +++--- vite-plugins/01.unocss.ts | 18 +-- vite-plugins/01.unplugin-vue-i18n.ts | 32 +++-- vite-plugins/01.unplugin-vue-markdown.ts | 16 ++- .../01.vite-plugin-vue-meta-layouts.ts | 32 +++-- vite-plugins/02.unplugin-auto-import.ts | 2 +- .../09.vite-plugin-image-optimizer.ts | 16 ++- vite-plugins/_loadPlugins.ts | 36 ++--- 28 files changed, 334 insertions(+), 181 deletions(-) create mode 100644 .ignore diff --git a/.ignore b/.ignore new file mode 100644 index 0000000..7f5ee00 --- /dev/null +++ b/.ignore @@ -0,0 +1,3 @@ +# VS Code 搜索忽略 + +pnpm-lock.yaml diff --git a/.vscode/settings.json b/.vscode/settings.json index af0c1e5..fad83eb 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,19 +1,38 @@ { + "typescript.tsdk": "node_modules/typescript/lib", + "typescript.preferences.autoImportFileExcludePatterns": [ + "vue-router$", + "**/src/composables/**", + "**/*-auto-imports.ts", + "**/*-auto-imports.types.ts" + ], + "search.exclude": { + "public/report-ui-dist": true + }, + + // ============================================================ + // 代码格式化相关配置 + // ============================================================ + "prettier.enable": true, + "eslint.enable": true, + "oxc.enable": true, + "stylelint.enable": true, + "editor.formatOnSave": true, "editor.codeActionsOnSave": { "source.fixAll": "explicit", "source.fixAll.eslint": "explicit", - "source.fixAll.stylelint": "explicit", "source.fixAll.oxc": "explicit", - "source.organizeImports": "never" + "source.fixAll.stylelint": "explicit", + "source.organizeImports": "explicit" }, - "eslint.enable": true, - "stylelint.enable": true, - "oxc.enable": true, - "editor.formatOnSave": true, "stylelint.validate": ["css", "less", "postcss", "scss", "vue"], "scss.lint.unknownAtRules": "ignore", "css.lint.unknownAtRules": "ignore", "less.lint.unknownAtRules": "ignore", + "editor.defaultFormatter": "esbenp.prettier-vscode", + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, "[vue]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, @@ -23,7 +42,10 @@ "[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, - "editor.defaultFormatter": "esbenp.prettier-vscode", + + // ============================================================ + // i18n-ally 配置 + // ============================================================ // >>>>> "i18n-ally.readonly": false, "i18n-ally.namespace": false /* 禁用命名空间(@intlify/unplugin-vue-i18n不支持吧?) */, @@ -34,10 +56,7 @@ "i18n-ally.enabledParsers": ["json"], "i18n-ally.keystyle": "nested", "i18n-ally.sourceLanguage": "zh-CN", // 翻译源语言 (源文件) 根据此语言文件翻译其他语言文件的变量和内容 - "i18n-ally.displayLanguage": "zh-CN", // 显示语言 (显示文件/翻译文件) + "i18n-ally.displayLanguage": "zh-CN" // 显示语言 (显示文件/翻译文件) // <<<<< - // https://github.com/copilot/share/8a1a019a-0180-80e7-8141-a40be02c4006 // "iconify.customCollectionJsonPaths": ["https://example.com/my-icons.json", "./local/icons.json"], - "typescript.tsdk": "node_modules/typescript/lib", - "typescript.preferences.autoImportFileExcludePatterns": ["vue-router/auto$"] } diff --git a/auto-imports.d.ts b/auto-imports.d.ts index 8f856e0..ded7700 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -42,6 +42,7 @@ declare global { const debouncedWatch: typeof import('@vueuse/core').debouncedWatch const deepFreeze: typeof import('deep-freeze-es6').default const defineAsyncComponent: typeof import('vue').defineAsyncComponent + const defineBasicLoader: typeof import('unplugin-vue-router/data-loaders/basic').defineBasicLoader const defineComponent: typeof import('vue').defineComponent const defineStore: typeof import('pinia').defineStore const eagerComputed: typeof import('@vueuse/core').eagerComputed @@ -222,7 +223,6 @@ declare global { const useIntervalFn: typeof import('@vueuse/core').useIntervalFn const useKeyModifier: typeof import('@vueuse/core').useKeyModifier const useLastChanged: typeof import('@vueuse/core').useLastChanged - const useLink: typeof import('vue-router/auto').useLink const useLoadingBar: typeof import('naive-ui').useLoadingBar const useLocalStorage: typeof import('@vueuse/core').useLocalStorage const useMagicKeys: typeof import('@vueuse/core').useMagicKeys @@ -388,6 +388,7 @@ declare module 'vue' { readonly debouncedWatch: UnwrapRef readonly deepFreeze: UnwrapRef readonly defineAsyncComponent: UnwrapRef + readonly defineBasicLoader: UnwrapRef readonly defineComponent: UnwrapRef readonly defineStore: UnwrapRef readonly eagerComputed: UnwrapRef @@ -568,7 +569,6 @@ declare module 'vue' { readonly useIntervalFn: UnwrapRef readonly useKeyModifier: UnwrapRef readonly useLastChanged: UnwrapRef - readonly useLink: UnwrapRef readonly useLoadingBar: UnwrapRef readonly useLocalStorage: UnwrapRef readonly useMagicKeys: UnwrapRef diff --git a/commitlint.config.ts b/commitlint.config.ts index e0a537f..37c0fc6 100644 --- a/commitlint.config.ts +++ b/commitlint.config.ts @@ -1,9 +1,11 @@ import type { UserConfig } from '@commitlint/types'; - const Configuration: UserConfig = { extends: ['@commitlint/config-conventional'], formatter: '@commitlint/format', + rules: { + 'body-max-line-length': [2, 'always', 500], + }, }; export default Configuration; diff --git a/eslint.config.ts b/eslint.config.ts index 4551def..4a00d63 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -10,6 +10,7 @@ import { import pluginImport from 'eslint-plugin-import'; import pluginJsonc from 'eslint-plugin-jsonc'; import pluginOxlint from 'eslint-plugin-oxlint'; +import pluginPerfectionist from 'eslint-plugin-perfectionist'; import pluginPlaywright from 'eslint-plugin-playwright'; import pluginVue from 'eslint-plugin-vue'; import { globalIgnores } from 'eslint/config'; @@ -24,7 +25,14 @@ export default defineConfigWithVueTs( files: ['**/*.{ts,mts,tsx,vue}'], }, - globalIgnores(['worker-configuration.d.ts', '**/dist/**', '**/dist-ssr/**', '**/coverage/**']), + globalIgnores([ + 'worker-configuration.d.ts', + '**/dist/**', + '**/dist-ssr/**', + '**/coverage/**', + '**/public/**', + '**/-----TEMP-----/**', + ]), pluginVue.configs['flat/essential'], vueTsConfigs.recommended, @@ -45,6 +53,13 @@ export default defineConfigWithVueTs( { rules: { '@intlify/vue-i18n/no-raw-text': 'off', + '@intlify/vue-i18n/no-unused-keys': [ + 'error', + { + src: './src', + extensions: ['.js', '.ts', '.tsx', '.vue'], + }, + ], }, settings: { 'vue-i18n': { @@ -54,9 +69,7 @@ export default defineConfigWithVueTs( }, }, { - plugins: { - import: pluginImport, - }, + plugins: { import: pluginImport }, rules: { 'import/first': 'error', 'import/no-duplicates': 'error', @@ -70,6 +83,8 @@ export default defineConfigWithVueTs( }, }, + { plugins: { perfectionist: pluginPerfectionist } }, + { /** * 启用 sort-keys 规则以强制对象键按字母顺序排序 @@ -102,7 +117,11 @@ export default defineConfigWithVueTs( 'vue/attributes-order': 'error', 'vue/multi-word-component-names': 'off', 'vue/padding-line-between-blocks': ['error', 'always'], - + 'vue/component-name-in-template-casing': [ + 'error', + 'PascalCase', + { registeredComponentsOnly: false, ignores: [] }, + ], // '@stylistic/padding-line-between-statements': [ // 'error', // { blankLine: 'always', prev: '*', next: ['const', 'let', 'var'] }, diff --git a/package.json b/package.json index 2cc6aec..6a2c8d1 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ }, "scripts": { "all": "run-s lint format:prettier build-only type-check test:unit:DisableWatch", - "dev": "vite --port 4730 --host --strictPort", + "dev": "nodemon -w 'vite-plugins/**/*.ts' -e .ts -x vite --port 4730 --host --strictPort", "build": "run-p type-check \"build-only {@}\" --", "build-only": "vite build", "preview": "vite preview --port 4731 --host --strictPort", @@ -111,6 +111,7 @@ "eslint-plugin-import": "^2.32.0", "eslint-plugin-jsonc": "^2.21.0", "eslint-plugin-oxlint": "~1.29.0", + "eslint-plugin-perfectionist": "^4.15.1", "eslint-plugin-playwright": "^2.3.0", "eslint-plugin-vue": "~10.6.0", "happy-dom": "^20.0.10", @@ -118,6 +119,7 @@ "husky": "^9.1.7", "jsdom": "^27.2.0", "lint-staged": "^16.2.7", + "nodemon": "^3.1.11", "npm-run-all2": "^8.0.4", "nprogress": "^0.2.0", "oxlint": "~1.29.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2d0d88e..87a3a7d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -174,6 +174,9 @@ importers: eslint-plugin-oxlint: specifier: ~1.29.0 version: 1.29.0 + eslint-plugin-perfectionist: + specifier: ^4.15.1 + version: 4.15.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) eslint-plugin-playwright: specifier: ^2.3.0 version: 2.3.0(eslint@9.39.1(jiti@2.6.1)) @@ -198,6 +201,9 @@ importers: node: specifier: runtime:^24.11.1 version: runtime:24.11.1 + nodemon: + specifier: ^3.1.11 + version: 3.1.11 npm-run-all2: specifier: ^8.0.4 version: 8.0.4 @@ -3464,6 +3470,12 @@ packages: eslint-plugin-oxlint@1.29.0: resolution: {integrity: sha512-VmaZ1I0lXJVJokOpnV8F7e339hcFPln5EWY8KGCdTkBnrkRmAeH25GRO6F37lZEDO9e+px5xjqbkq9g3lejBdg==} + eslint-plugin-perfectionist@4.15.1: + resolution: {integrity: sha512-MHF0cBoOG0XyBf7G0EAFCuJJu4I18wy0zAoT1OHfx2o6EOx1EFTIzr2HGeuZa1kDcusoX0xJ9V7oZmaeFd773Q==} + engines: {node: ^18.0.0 || >=20.0.0} + peerDependencies: + eslint: '>=8.45.0' + eslint-plugin-playwright@2.3.0: resolution: {integrity: sha512-7UeUuIb5SZrNkrUGb2F+iwHM97kn33/huajcVtAaQFCSMUYGNFvjzRPil5C0OIppslPfuOV68M/zsisXx+/ZvQ==} engines: {node: '>=16.9.0'} @@ -3810,6 +3822,10 @@ packages: resolution: {integrity: sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==} engines: {node: '>= 0.4'} + has-flag@3.0.0: + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} + engines: {node: '>=4'} + has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} @@ -3884,6 +3900,9 @@ packages: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} + ignore-by-default@1.0.1: + resolution: {integrity: sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==} + ignore@5.3.2: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} @@ -4492,6 +4511,10 @@ packages: natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + natural-orderby@5.0.0: + resolution: {integrity: sha512-kKHJhxwpR/Okycz4HhQKKlhWe4ASEfPgkSWNmKFHd7+ezuQlxkA5cM3+XkBPvm1gmHen3w53qsYAv+8GwRrBlg==} + engines: {node: '>=18'} + neverthrow@8.2.0: resolution: {integrity: sha512-kOCT/1MCPAxY5iUV3wytNFUMUolzuwd/VF/1KCx7kf6CutrOsTie+84zTGTpgQycjvfLdBBdvBvFLqFD2c0wkQ==} engines: {node: '>=18'} @@ -4598,6 +4621,11 @@ packages: version: 24.11.1 hasBin: true + nodemon@3.1.11: + resolution: {integrity: sha512-is96t8F/1//UHAjNPHpbsNY46ELPpftGUoSVNXwUfMk/qdjSylYrWSu1XavVTBOn526kFiOR733ATgNBCQyH0g==} + engines: {node: '>=10'} + hasBin: true + nopt@7.2.1: resolution: {integrity: sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -4905,6 +4933,9 @@ packages: proxy-from-env@1.1.0: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + pstree.remy@1.1.8: + resolution: {integrity: sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==} + punycode.js@2.3.1: resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} engines: {node: '>=6'} @@ -5214,6 +5245,10 @@ packages: simple-swizzle@0.2.4: resolution: {integrity: sha512-nAu1WFPQSMNr2Zn9PGSZK9AGn4t/y97lEm+MXTtUDwfP0ksAIX4nO+6ruD9Jwut4C49SB1Ws+fbXsm/yScWOHw==} + simple-update-notifier@2.0.0: + resolution: {integrity: sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==} + engines: {node: '>=10'} + simplebar-core@1.3.2: resolution: {integrity: sha512-qKgTTuTqapjsFGkNhCjyPhysnbZGpQqNmjk0nOYjFN5ordC/Wjvg+RbYCyMSnW60l/Z0ZS82GbNltly6PMUH1w==} @@ -5419,6 +5454,10 @@ packages: resolution: {integrity: sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==} engines: {node: '>=18'} + supports-color@5.5.0: + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} + supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} @@ -5518,6 +5557,10 @@ packages: resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} engines: {node: '>=6'} + touch@3.1.1: + resolution: {integrity: sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==} + hasBin: true + tough-cookie@6.0.0: resolution: {integrity: sha512-kXuRi1mtaKMrsLUxz3sQYvVl37B0Ns6MzfrtV5DvJceE9bPyspOqk9xxv7XbZWcfLWbFmm997vl83qUWVJA64w==} engines: {node: '>=16'} @@ -5599,6 +5642,9 @@ packages: unconfig@7.4.1: resolution: {integrity: sha512-uyQ7LElcGizrOGZyIq9KU+xkuEjcRf9IpmDTkCSYv5mEeZzrXSj6rb51C0L+WTedsmAoVxW9WKrLWhSwebIM9Q==} + undefsafe@2.0.5: + resolution: {integrity: sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==} + undici-types@6.21.0: resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} @@ -6288,7 +6334,7 @@ snapshots: '@babel/types': 7.28.5 '@jridgewell/remapping': 2.3.5 convert-source-map: 2.0.0 - debug: 4.4.3 + debug: 4.4.3(supports-color@5.5.0) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -6454,7 +6500,7 @@ snapshots: '@babel/parser': 7.28.5 '@babel/template': 7.27.2 '@babel/types': 7.28.5 - debug: 4.4.3 + debug: 4.4.3(supports-color@5.5.0) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -6467,7 +6513,7 @@ snapshots: '@babel/parser': 7.28.5 '@babel/template': 7.27.2 '@babel/types': 7.28.5 - debug: 4.4.3 + debug: 4.4.3(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -6943,7 +6989,7 @@ snapshots: '@eslint/config-array@0.21.1': dependencies: '@eslint/object-schema': 2.1.7 - debug: 4.4.3 + debug: 4.4.3(supports-color@5.5.0) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -6959,7 +7005,7 @@ snapshots: '@eslint/eslintrc@3.3.1': dependencies: ajv: 6.12.6 - debug: 4.4.3 + debug: 4.4.3(supports-color@5.5.0) espree: 10.4.0 globals: 14.0.0 ignore: 5.3.2 @@ -7015,7 +7061,7 @@ snapshots: '@antfu/install-pkg': 1.1.0 '@antfu/utils': 9.3.0 '@iconify/types': 2.0.0 - debug: 4.4.3 + debug: 4.4.3(supports-color@5.5.0) globals: 15.15.0 kolorist: 1.8.0 local-pkg: 1.1.2 @@ -7218,7 +7264,7 @@ snapshots: '@eslint/eslintrc': 3.3.1 '@intlify/core-base': 11.2.2 '@intlify/message-compiler': 11.2.2 - debug: 4.4.3 + debug: 4.4.3(supports-color@5.5.0) eslint: 9.39.1(jiti@2.6.1) eslint-compat-utils: 0.6.5(eslint@9.39.1(jiti@2.6.1)) glob: 10.5.0 @@ -7254,7 +7300,7 @@ snapshots: '@rollup/pluginutils': 5.3.0(rollup@4.53.3) '@typescript-eslint/scope-manager': 8.47.0 '@typescript-eslint/typescript-estree': 8.47.0(typescript@5.9.3) - debug: 4.4.3 + debug: 4.4.3(supports-color@5.5.0) fast-glob: 3.3.3 pathe: 2.0.3 picocolors: 1.1.1 @@ -7820,7 +7866,7 @@ snapshots: '@typescript-eslint/types': 8.47.0 '@typescript-eslint/typescript-estree': 8.47.0(typescript@5.9.3) '@typescript-eslint/visitor-keys': 8.47.0 - debug: 4.4.3 + debug: 4.4.3(supports-color@5.5.0) eslint: 9.39.1(jiti@2.6.1) typescript: 5.9.3 transitivePeerDependencies: @@ -7830,7 +7876,7 @@ snapshots: dependencies: '@typescript-eslint/tsconfig-utils': 8.47.0(typescript@5.9.3) '@typescript-eslint/types': 8.47.0 - debug: 4.4.3 + debug: 4.4.3(supports-color@5.5.0) typescript: 5.9.3 transitivePeerDependencies: - supports-color @@ -7849,7 +7895,7 @@ snapshots: '@typescript-eslint/types': 8.47.0 '@typescript-eslint/typescript-estree': 8.47.0(typescript@5.9.3) '@typescript-eslint/utils': 8.47.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) - debug: 4.4.3 + debug: 4.4.3(supports-color@5.5.0) eslint: 9.39.1(jiti@2.6.1) ts-api-utils: 2.1.0(typescript@5.9.3) typescript: 5.9.3 @@ -7864,7 +7910,7 @@ snapshots: '@typescript-eslint/tsconfig-utils': 8.47.0(typescript@5.9.3) '@typescript-eslint/types': 8.47.0 '@typescript-eslint/visitor-keys': 8.47.0 - debug: 4.4.3 + debug: 4.4.3(supports-color@5.5.0) fast-glob: 3.3.3 is-glob: 4.0.3 minimatch: 9.0.5 @@ -9063,9 +9109,11 @@ snapshots: dependencies: ms: 2.1.3 - debug@4.4.3: + debug@4.4.3(supports-color@5.5.0): dependencies: ms: 2.1.3 + optionalDependencies: + supports-color: 5.5.0 decimal.js@10.6.0: {} @@ -9448,6 +9496,16 @@ snapshots: dependencies: jsonc-parser: 3.3.1 + eslint-plugin-perfectionist@4.15.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3): + dependencies: + '@typescript-eslint/types': 8.47.0 + '@typescript-eslint/utils': 8.47.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) + eslint: 9.39.1(jiti@2.6.1) + natural-orderby: 5.0.0 + transitivePeerDependencies: + - supports-color + - typescript + eslint-plugin-playwright@2.3.0(eslint@9.39.1(jiti@2.6.1)): dependencies: eslint: 9.39.1(jiti@2.6.1) @@ -9502,7 +9560,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.6 - debug: 4.4.3 + debug: 4.4.3(supports-color@5.5.0) escape-string-regexp: 4.0.0 eslint-scope: 8.4.0 eslint-visitor-keys: 4.2.1 @@ -9817,6 +9875,8 @@ snapshots: has-bigints@1.1.0: {} + has-flag@3.0.0: {} + has-flag@4.0.0: {} has-property-descriptors@1.0.2: @@ -9875,14 +9935,14 @@ snapshots: http-proxy-agent@7.0.2: dependencies: agent-base: 7.1.4 - debug: 4.4.3 + debug: 4.4.3(supports-color@5.5.0) transitivePeerDependencies: - supports-color https-proxy-agent@7.0.6: dependencies: agent-base: 7.1.4 - debug: 4.4.3 + debug: 4.4.3(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -9892,6 +9952,8 @@ snapshots: dependencies: safer-buffer: 2.1.2 + ignore-by-default@1.0.1: {} + ignore@5.3.2: {} ignore@7.0.5: {} @@ -10474,6 +10536,8 @@ snapshots: natural-compare@1.4.0: {} + natural-orderby@5.0.0: {} + neverthrow@8.2.0: optionalDependencies: '@rollup/rollup-linux-x64-gnu': 4.53.3 @@ -10492,6 +10556,19 @@ snapshots: node@runtime:24.11.1: {} + nodemon@3.1.11: + dependencies: + chokidar: 3.6.0 + debug: 4.4.3(supports-color@5.5.0) + ignore-by-default: 1.0.1 + minimatch: 3.1.2 + pstree.remy: 1.1.8 + semver: 7.7.3 + simple-update-notifier: 2.0.0 + supports-color: 5.5.0 + touch: 3.1.1 + undefsafe: 2.0.5 + nopt@7.2.1: dependencies: abbrev: 2.0.0 @@ -10831,6 +10908,8 @@ snapshots: proxy-from-env@1.1.0: {} + pstree.remy@1.1.8: {} + punycode.js@2.3.1: {} punycode@2.3.1: {} @@ -11201,6 +11280,10 @@ snapshots: dependencies: is-arrayish: 0.3.4 + simple-update-notifier@2.0.0: + dependencies: + semver: 7.7.3 + simplebar-core@1.3.2: dependencies: lodash: 4.17.21 @@ -11412,7 +11495,7 @@ snapshots: cosmiconfig: 9.0.0(typescript@5.9.3) css-functions-list: 3.2.3 css-tree: 3.1.0 - debug: 4.4.3 + debug: 4.4.3(supports-color@5.5.0) fast-glob: 3.3.3 fastest-levenshtein: 1.0.16 file-entry-cache: 11.1.1 @@ -11450,6 +11533,10 @@ snapshots: supports-color@10.2.2: {} + supports-color@5.5.0: + dependencies: + has-flag: 3.0.0 + supports-color@7.2.0: dependencies: has-flag: 4.0.0 @@ -11542,6 +11629,8 @@ snapshots: totalist@3.0.1: {} + touch@3.1.1: {} + tough-cookie@6.0.0: dependencies: tldts: 7.0.18 @@ -11649,6 +11738,8 @@ snapshots: quansync: 0.2.11 unconfig-core: 7.4.1 + undefsafe@2.0.5: {} + undici-types@6.21.0: {} undici-types@7.16.0: {} @@ -11739,7 +11830,7 @@ snapshots: dependencies: '@antfu/install-pkg': 1.1.0 '@iconify/utils': 3.0.2 - debug: 4.4.3 + debug: 4.4.3(supports-color@5.5.0) local-pkg: 1.1.2 unplugin: 2.3.11 optionalDependencies: @@ -11755,7 +11846,7 @@ snapshots: unplugin-vue-components@30.0.0(@babel/parser@7.28.5)(vue@3.5.25(typescript@5.9.3)): dependencies: chokidar: 4.0.3 - debug: 4.4.3 + debug: 4.4.3(supports-color@5.5.0) local-pkg: 1.1.2 magic-string: 0.30.21 mlly: 1.8.0 @@ -11898,7 +11989,7 @@ snapshots: vite-plugin-inspect@11.3.3(vite@7.2.6(@types/node@24.10.1)(jiti@2.6.1)(lightningcss@1.30.1)(sass-embedded@1.93.3)(sass@1.93.3)(terser@5.44.1)(yaml@2.8.2)): dependencies: ansis: 4.2.0 - debug: 4.4.3 + debug: 4.4.3(supports-color@5.5.0) error-stack-parser-es: 1.0.5 ohash: 2.0.11 open: 10.2.0 @@ -12033,7 +12124,7 @@ snapshots: vue-eslint-parser@10.2.0(eslint@9.39.1(jiti@2.6.1)): dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@5.5.0) eslint: 9.39.1(jiti@2.6.1) eslint-scope: 8.4.0 eslint-visitor-keys: 4.2.1 diff --git a/src/App.vue b/src/App.vue index 8e74ce2..9a8bc94 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,10 +9,10 @@ import AppNaiveUIProvider from './AppNaiveUIProvider.vue'; - - + + - - + + diff --git a/src/AppNaiveUIProvider.vue b/src/AppNaiveUIProvider.vue index cb3069c..50f9033 100644 --- a/src/AppNaiveUIProvider.vue +++ b/src/AppNaiveUIProvider.vue @@ -42,17 +42,17 @@ declare global { :theme="appStore.isDark ? darkTheme : null" abstract > - - - - - + + + + + - - - - - + + + + + diff --git a/src/layouts/base-layout/base-layout-header/components/LanguageSwitchButton.vue b/src/layouts/base-layout/base-layout-header/components/LanguageSwitchButton.vue index 21624ff..966874e 100644 --- a/src/layouts/base-layout/base-layout-header/components/LanguageSwitchButton.vue +++ b/src/layouts/base-layout/base-layout-header/components/LanguageSwitchButton.vue @@ -25,7 +25,7 @@ function handleSelect(key: string) { {{ languageLabels[locale] }} diff --git a/src/layouts/base-layout/base-layout-header/components/ThemeSwitchButton.vue b/src/layouts/base-layout/base-layout-header/components/ThemeSwitchButton.vue index bc05df4..067263a 100644 --- a/src/layouts/base-layout/base-layout-header/components/ThemeSwitchButton.vue +++ b/src/layouts/base-layout/base-layout-header/components/ThemeSwitchButton.vue @@ -13,17 +13,17 @@ const themeLabels: Record = { {{ themeLabels[appStore.themeMode] }} diff --git a/src/layouts/base-layout/base-layout-header/components/ToggleSiderButton.vue b/src/layouts/base-layout/base-layout-header/components/ToggleSiderButton.vue index b2e7087..8244a5b 100644 --- a/src/layouts/base-layout/base-layout-header/components/ToggleSiderButton.vue +++ b/src/layouts/base-layout/base-layout-header/components/ToggleSiderButton.vue @@ -15,8 +15,8 @@ function toggleCollapsed() { {{ appStore.sidebarCollapsed ? '展开菜单' : '收起菜单' }} diff --git a/src/layouts/base-layout/base-layout-header/components/UserDropdown.vue b/src/layouts/base-layout/base-layout-header/components/UserDropdown.vue index 47650a4..d1b1365 100644 --- a/src/layouts/base-layout/base-layout-header/components/UserDropdown.vue +++ b/src/layouts/base-layout/base-layout-header/components/UserDropdown.vue @@ -39,7 +39,7 @@ function handleSelect(key: string) { diff --git a/src/layouts/base-layout/the-base-layout.vue b/src/layouts/base-layout/the-base-layout.vue index c7f113c..bfcba02 100644 --- a/src/layouts/base-layout/the-base-layout.vue +++ b/src/layouts/base-layout/the-base-layout.vue @@ -29,11 +29,11 @@ const appStore = useAppStore(); - - + + - - + + 点击 +1 (Naive UI) - +