refactor: update icon system, fix login and add temp auth

refactor all icon map references from zniconsMap to iconsMap across the codebase
standardize icon import paths and add complete src/assets/fonts/znicons.ts definition file
fix login page query selector typo and replace hardcoded client ID with environment variable
add temporary auth token injection in request utility using env var
update ZnIcon documentation and development environment config
This commit is contained in:
DEV_DSW
2026-05-28 11:56:13 +08:00
parent 9d0890b541
commit 9af30b8b8a
12 changed files with 26 additions and 22 deletions

View File

@@ -14,8 +14,8 @@
- 字体映射表存在:`src/assets/fonts/znicons.js`
- 字体文件存在:`src/assets/fonts/znicons.ttf`
- 组件骨架存在但为空:`src/components/ZnIcon/index.vue`0 行)
- 业务中大量使用 `<uni-icons fontFamily="znicons">` + `zniconsMap[...]` 的方式展示字体图标,并且存在历史路径导入:
- `import { zniconsMap } from "@/static/fonts/znicons(.js)"`(仓库内当前没有 `src/static/`
- 业务中大量使用 `<uni-icons fontFamily="znicons">` + `iconsMap[...]` 的方式展示字体图标,并且存在历史路径导入:
- `import { iconsMap } from "@/static/fonts/znicons(.js)"`(仓库内当前没有 `src/static/`
- 多处样式中通过 `@font-face` 引用 `@/static/fonts/znicons.ttf`,但仓库内无该字体路径,导致字体加载不稳定:
- `src/components/ImageSwiper/styles/index.scss`
- `src/components/GoodDetail/index.vue`
@@ -42,7 +42,7 @@
#### Props 设计(建议)
- `name: string`(必填;对应 `zniconsMap` 的 key
- `name: string`(必填;对应 `iconsMap` 的 key
- `size?: number | string`(默认 16number 按 px 处理string 原样写入)
- `color?: string`(可选;不传则使用 `currentColor`,便于 Tailwind `text-*` 控制)
- `title?: string`(可选;用于无障碍/tooltip
@@ -72,9 +72,9 @@
### 3) 增加历史导入路径兼容层(不改业务代码也能编译)
新增文件:`src/static/fonts/znicons.js`
新增文件:`src/assets/fonts/znicons.js`
- 仅做 re-export`export { zniconsMap } from "@/assets/fonts/znicons.js"`
- 仅做 re-export`export { iconsMap } from "@/assets/fonts/znicons"`
说明: