uview-plus 3.3.70 → 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,13 @@
1
+ ## 3.3.72(2025-02-28)
2
+ feat: tabs组件支持icon图标及插槽
3
+
4
+ ## 3.3.71(2025-02-27)
5
+ feat: 折叠面板collapse增加titileStyle/iconStyle/rightIconStyle属性
6
+
7
+ feat: 折叠面板组件新增cellCustomStyle/cellCustomClass属性
8
+
9
+ fix: select组件盒模型
10
+
1
11
  ## 3.3.70(2025-02-24)
2
12
  fix: 修改u-checkbox-group组件changes事件发生位置
3
13
 
@@ -21,6 +21,11 @@ export default {
21
21
  name: '',
22
22
  icon: '',
23
23
  duration: 300,
24
- showRight: true
24
+ showRight: true,
25
+ titleStyle: {},
26
+ iconStyle: {},
27
+ rightIconStyle: {},
28
+ cellCustomStyle: {},
29
+ cellCustomClass: ''
25
30
  }
26
31
  }
@@ -7,6 +7,13 @@ export const props = defineMixin({
7
7
  type: String,
8
8
  default: () => defProps.collapseItem.title
9
9
  },
10
+ // 标题的样式
11
+ titleStyle: {
12
+ type: [Object, String],
13
+ default: () => {
14
+ return defProps.collapseItem.titleStyle
15
+ }
16
+ },
10
17
  // 标题右侧内容
11
18
  value: {
12
19
  type: String,
@@ -62,5 +69,29 @@ export const props = defineMixin({
62
69
  type: Boolean,
63
70
  default: () => defProps.collapseItem.showRight
64
71
  },
72
+ // 左侧图标样式
73
+ iconStyle: {
74
+ type: [Object, String],
75
+ default: () => {
76
+ return defProps.collapseItem.iconStyle
77
+ }
78
+ },
79
+ // 右侧箭头图标的样式
80
+ rightIconStyle: {
81
+ type: [Object, String],
82
+ default: () => {
83
+ return defProps.collapseItem.rightIconStyle
84
+ }
85
+ },
86
+ cellCustomStyle: {
87
+ type: [Object, String],
88
+ default: () => {
89
+ return defProps.collapseItem.cellCustomStyle
90
+ }
91
+ },
92
+ cellCustomClass: {
93
+ type: String,
94
+ default: () => defProps.collapseItem.cellCustomClass
95
+ }
65
96
  }
66
97
  })
@@ -11,6 +11,8 @@
11
11
  @click="clickHandler"
12
12
  :arrowDirection="expanded ? 'up' : 'down'"
13
13
  :disabled="disabled"
14
+ :customClass="cellCustomClass"
15
+ :customStyle="cellCustomStyle"
14
16
  >
15
17
  <!-- 微信小程序不支持,因为微信中不支持 <slot name="title" #title />的写法 -->
16
18
  <template #title>
@@ -105,7 +105,8 @@
105
105
  margin-right: 2px;
106
106
  }
107
107
  .u-select__options {
108
- min-width: 100px;
108
+ min-width: 100px;
109
+ box-sizing: border-box;
109
110
  border-radius: 4px;
110
111
  border: 1px solid #f1f1f1;
111
112
  background-color: #fff;
@@ -113,7 +114,8 @@
113
114
  top: 20px;
114
115
  left: 0;
115
116
  .u-select__options_item {
116
- padding: 10px 12px;
117
+ padding: 10px 12px;
118
+ box-sizing: border-box;
117
119
  width: 100%;
118
120
  height: 100%;
119
121
  &:hover {
@@ -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.70",
5
+ "version": "3.3.72",
6
6
  "description": "零云®uview-plus已兼容vue3,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
7
7
  "keywords": [
8
8
  "uview",