refactor(ui): 移除uni-icons和uni-scss模块,改用unocss图标

- 删除uni-icons相关组件、字体文件和文档
- 删除uni-scss样式文件和变量配置
- 更新tabbar配置使用unocss图标
- 在uno.config.ts中添加新的安全图标
This commit is contained in:
feige996
2025-09-15 21:39:58 +08:00
parent 6b5e2f9d0b
commit a4f774cbae
27 changed files with 9 additions and 3060 deletions

View File

@@ -52,7 +52,7 @@ export type CustomTabBarItemBadge = number | 'dot'
export interface CustomTabBarItem {
text: string
pagePath: string
iconType: 'uniUi' | 'uiLib' | 'unocss' | 'iconfont' | 'image' // 不建议用 image 模式需要配置2张图
iconType: 'uiLib' | 'unocss' | 'iconfont' | 'image' // 不建议用 image 模式需要配置2张图
icon: any // 其实是 string 类型,这里是为了避免 ts 报错 (tabbar/index.vue 里面 uni-icons 那行)
iconActive?: string // 只有在 image 模式下才需要传递的是高亮的图片PS 不建议用 image 模式)
badge?: CustomTabBarItemBadge
@@ -64,11 +64,11 @@ export const customTabbarList: CustomTabBarItem[] = [
{
text: '首页',
pagePath: 'pages/index/index',
// 本框架内置了 uniapp 官方UI库 uni-ui)的图标库
// 使用方式如:<uni-icons type="home" size="30"/>
// 图标列表地址https://uniapp.dcloud.net.cn/component/uniui/uni-icons.html
iconType: 'uniUi',
icon: 'home',
// 注意 unocss 图标需要如下处理:(二选一)
// 1在fg-tabbar.vue页面上引入一下并注释掉见tabbar/index.vue代码第2行
// 2配置到 unocss.config.ts 的 safelist 中
iconType: 'unocss',
icon: 'i-carbon-home',
// badge: 'dot',
},
{
@@ -84,8 +84,8 @@ export const customTabbarList: CustomTabBarItem[] = [
{
pagePath: 'pages/me/me',
text: '我的',
iconType: 'uniUi',
icon: 'contact',
iconType: 'unocss',
icon: 'i-carbon-user',
// badge: 100,
},
// 其他类型演示