diff --git a/package.json b/package.json index bcea3ed..5d7b410 100644 --- a/package.json +++ b/package.json @@ -41,14 +41,12 @@ "@antfu/eslint-config": "^9.0.0", "@commitlint/cli": "^19.8.1", "@commitlint/config-conventional": "^19.8.1", - "@iconify/json": "^2.2.489", "@types/fs-extra": "^11.0.4", "@types/lodash-es": "^4.17.12", "@types/node": "^24.13.2", "@types/nprogress": "^0.2.3", "@types/qs": "^6.15.1", "@unocss/eslint-plugin": "^66.7.2", - "@unocss/preset-icons": "^66.7.2", "@unocss/preset-rem-to-px": "^66.7.2", "@unocss/reset": "^66.7.2", "@unocss/transformer-directives": "^66.7.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6bdc6f5..bf7bc22 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,9 +45,6 @@ importers: '@commitlint/config-conventional': specifier: ^19.8.1 version: 19.8.1 - '@iconify/json': - specifier: ^2.2.489 - version: 2.2.489 '@types/fs-extra': specifier: ^11.0.4 version: 11.0.4 @@ -66,9 +63,6 @@ importers: '@unocss/eslint-plugin': specifier: ^66.7.2 version: 66.7.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3) - '@unocss/preset-icons': - specifier: ^66.7.2 - version: 66.7.2 '@unocss/preset-rem-to-px': specifier: ^66.7.2 version: 66.7.2 @@ -669,9 +663,6 @@ packages: resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} engines: {node: '>=18.18'} - '@iconify/json@2.2.489': - resolution: {integrity: sha512-KkgFv48FLPmIvex3fl5sCr1zcKV+Q4leIgk8TNnRx0j1S326+78NnTTy3DjArwyX6eNwaQutDKy4dzmpjRnOFg==} - '@iconify/types@2.0.0': resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} @@ -4477,11 +4468,6 @@ snapshots: '@humanwhocodes/retry@0.4.3': {} - '@iconify/json@2.2.489': - dependencies: - '@iconify/types': 2.0.0 - pathe: 2.0.3 - '@iconify/types@2.0.0': {} '@iconify/utils@3.1.3': diff --git a/src/mobile/router/modules.ts b/src/mobile/router/modules.ts index 715dcb9..55c2708 100644 --- a/src/mobile/router/modules.ts +++ b/src/mobile/router/modules.ts @@ -12,7 +12,6 @@ const routeModuleList: Array = [ component: Layout, meta: { title: '首页', - icon: 'i-ph:house', }, children: [ { diff --git a/src/shared/enums/pageEnum.ts b/src/shared/enums/pageEnum.ts deleted file mode 100644 index 3f104c3..0000000 --- a/src/shared/enums/pageEnum.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* eslint-disable ts/no-duplicate-enum-values */ -export enum PageEnum { - // 首页 - BASE_HOME = '/', - BASE_HOME_REDIRECT = '/', - // 错误 - ERROR_PAGE_NAME = 'ErrorPage', -} diff --git a/uno.config.ts b/uno.config.ts index bf084cc..5682d25 100644 --- a/uno.config.ts +++ b/uno.config.ts @@ -1,19 +1,15 @@ -import presetIcons from '@unocss/preset-icons' import presetRemToPx from '@unocss/preset-rem-to-px' import transformerDirectives from '@unocss/transformer-directives' import transformerVariantGroup from '@unocss/transformer-variant-group' import { defineConfig, - presetAttributify, - presetTypography, presetUno, - presetWebFonts, } from 'unocss' export default defineConfig({ // ...UnoCSS options presets: [ - // 此预设尝试提供流行的实用程序优先框架的通用超集,包括 Tailwind CSS、Windi CSS、Bootstrap、Tachyons 等 + // 此预设尝试提供流行的实用程序优先框架的通用超集,包括 Tailwind CSS、Windy CSS、Bootstrap、Tachyons 等 presetUno(), // 模板使用 viewport 作为移动端适配方案,unocss 默认单位为 rem @@ -23,32 +19,6 @@ export default defineConfig({ // default baseFontSize: 16, }), - - // 图标预设: https://unocss.dev/presets/icons - presetIcons({ - // cdn: 'https://esm.sh/', - extraProperties: { - 'display': 'inline-block', - 'vertical-align': 'middle', - }, - }), - - // 属性模式(在 class 属性过多的情况下优先使用属性模式,否则将会变得难以维护) - // https://unocss.dev/presets/attributify#attributify-mode - presetAttributify(), - - // https://unocss.dev/presets/typography#usage - presetTypography(), - - // 网络字体预设:https://unocss.dev/presets/web-fonts - presetWebFonts({ - // 默认字体提供商 https://unocss.dev/presets/web-fonts#providers - provider: 'none', - // https://unocss.dev/presets/web-fonts#example - fonts: { - mono: ['Fira Code'], - }, - }), ], transformers: [ // 启用 Windi CSS for UnoCSS 的变体组功能(就是简写,具体看链接): https://unocss.dev/transformers/variant-group#usage @@ -68,13 +38,4 @@ export default defineConfig({ 'text-overflow': 'overflow-hidden whitespace-nowrap text-ellipsis', // 文本溢出显示省略号 'text-break': 'whitespace-normal break-all break-words', // 文本溢出换行 }, - - // 由于 UnoCSS 在构建时工作,这意味着只会生成静态呈现的 icon 并将其发送到你的组件中 - // 通过模板字符串 :class="menu.meta?.icon" 来动态生成 CSS 类名。 - // 这个类名是在运行时计算的,UnoCSS 在构建时无法知道 menu.meta?.icon 的具体值, - // 因此无法生成对应的 CSS。为了解决这个问题,你可以使用 UnoCSS 的 safelist 选项来指定一些始终需要生成的 CSS 类。 - // https://unocss.dev/guide/advanced#safelist - safelist: [ - 'i-ph:house', - ], })