uview-plus 3.3.71 → 3.3.72

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.
package/changelog.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 3.3.72(2025-02-28)
2
+ feat: tabs组件支持icon图标及插槽
3
+
1
4
  ## 3.3.71(2025-02-27)
2
5
  feat: 折叠面板collapse增加titileStyle/iconStyle/rightIconStyle属性
3
6
 
@@ -61,6 +61,11 @@ export const props = defineMixin({
61
61
  keyName: {
62
62
  type: String,
63
63
  default: () => defProps.tabs.keyName
64
- }
64
+ },
65
+ // 左侧图标样式
66
+ iconStyle: {
67
+ type: [String, Object],
68
+ default: () => defProps.tabs.iconStyle
69
+ }
65
70
  }
66
71
  })
@@ -27,6 +27,7 @@ export default {
27
27
  },
28
28
  scrollable: true,
29
29
  current: 0,
30
- keyName: 'name'
30
+ keyName: 'name',
31
+ iconStyle: {}
31
32
  }
32
33
  }
@@ -27,6 +27,15 @@
27
27
  item.disabled && 'u-tabs__wrapper__nav__item--disabled',
28
28
  innerCurrent == index ? 'u-tabs__wrapper__nav__item-active' : '']"
29
29
  >
30
+ <slot v-if="$slots.icon" name="icon" :item="item" :keyName="keyName" :index="index" />
31
+ <template v-else>
32
+ <view class="u-tabs__wrapper__nav__item__prefix-icon" v-if="item.icon">
33
+ <up-icon
34
+ :name="item.icon"
35
+ :customStyle="addStyle(iconStyle)"
36
+ ></up-icon>
37
+ </view>
38
+ </template>
30
39
  <slot v-if="$slots.content" name="content" :item="item" :keyName="keyName" :index="index" />
31
40
  <slot v-else-if="!$slots.content && ($slots.default || $slots.$default)"
32
41
  :item="item" :keyName="keyName" :index="index" />
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "id": "uview-plus",
3
3
  "name": "uview-plus",
4
4
  "displayName": "零云®uview-plus3.0重磅发布,全面的Vue3鸿蒙移动组件库。",
5
- "version": "3.3.71",
5
+ "version": "3.3.72",
6
6
  "description": "零云®uview-plus已兼容vue3,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
7
7
  "keywords": [
8
8
  "uview",