Просмотр исходного кода

docs(tabbar): 更新配置文件中关于图标类型的注释说明

feige996 9 месяцев назад
Родитель
Сommit
e363ef301c
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/tabbar/config.ts

+ 1 - 1
src/tabbar/config.ts

@@ -3,7 +3,7 @@ import type { TabBar } from '@uni-helper/vite-plugin-uni-pages'
 type NativeTabBarItem = TabBar['list'][0]
 type NativeTabBarItem = TabBar['list'][0]
 
 
 type CustomTabBarItem = Pick<NativeTabBarItem, 'text' | 'pagePath'> & {
 type CustomTabBarItem = Pick<NativeTabBarItem, 'text' | 'pagePath'> & {
-  iconType: 'uniUi' | 'uiLib' | 'unocss' | 'iconfont' | 'image'
+  iconType: 'uniUi' | 'uiLib' | 'unocss' | 'iconfont' | 'image' // 不建议用 image 模式,需要配置2张图
   icon: any // 其实是 string 类型,这里是为了避免 ts 报错 (tabbar/index.vue 里面 uni-icons 那行)
   icon: any // 其实是 string 类型,这里是为了避免 ts 报错 (tabbar/index.vue 里面 uni-icons 那行)
   activeIcon?: string // 只有在 image 模式下才需要,传递的是高亮的图片(PS: 不建议用 image 模式)
   activeIcon?: string // 只有在 image 模式下才需要,传递的是高亮的图片(PS: 不建议用 image 模式)
 }
 }