wui-components-v2 1.1.87 → 1.1.88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -71,19 +71,27 @@ export default {
71
71
  :active-color="currentThemeColor.primary"
72
72
  @change="handleTabbarChange"
73
73
  >
74
- <wd-tabbar-item
75
- v-for="(item, index) in tabbarList"
76
- :key="index"
77
- :name="item.name"
78
- :value="getTabbarItemValue(item.name)"
79
- :title="item.title"
80
- :icon="item.icon"
81
- >
82
- <!-- 使用 icon 插槽自定义图标 -->
83
- <template v-if="item.activeIcon" #icon="{ active }">
84
- <image :src="active ? item.activeIcon : item.inactiveIcon" class="custom-icon" />
85
- </template>
86
- </wd-tabbar-item>
74
+ <!-- 有激活/未激活两张图时用图片图标(声明 #icon 插槽) -->
75
+ <template v-for="(item, index) in tabbarList" :key="index">
76
+ <wd-tabbar-item
77
+ v-if="item.activeIcon && item.inactiveIcon"
78
+ :name="item.name"
79
+ :value="getTabbarItemValue(item.name)"
80
+ :title="item.title"
81
+ >
82
+ <template #icon="{ active }">
83
+ <image :src="active ? item.activeIcon : item.inactiveIcon" class="custom-icon" />
84
+ </template>
85
+ </wd-tabbar-item>
86
+ <!-- 反之不声明 #icon 插槽,交给 wd-tabbar-item 内部渲染 wd-icon 字体图标 -->
87
+ <wd-tabbar-item
88
+ v-else
89
+ :name="item.name"
90
+ :value="getTabbarItemValue(item.name)"
91
+ :title="item.title"
92
+ :icon="item.icon"
93
+ />
94
+ </template>
87
95
  </wd-tabbar>
88
96
  <!-- #ifdef MP-WEIXIN -->
89
97
  <privacy-popup />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wui-components-v2",
3
- "version": "1.1.87",
3
+ "version": "1.1.88",
4
4
  "description": "wui 组件库",
5
5
  "author": "wgxshh",
6
6
  "license": "MIT",