uview-plus 3.5.15 → 3.5.16
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
|
@@ -7,7 +7,7 @@ export const props = defineMixin({
|
|
|
7
7
|
type: [String, Number, null],
|
|
8
8
|
default: () => defProps.tabbarItem.name
|
|
9
9
|
},
|
|
10
|
-
//
|
|
10
|
+
// uview-plus内置图标或者绝对路径的图片
|
|
11
11
|
icon: {
|
|
12
12
|
icon: String,
|
|
13
13
|
default: () => defProps.tabbarItem.icon
|
|
@@ -31,7 +31,11 @@ export const props = defineMixin({
|
|
|
31
31
|
badgeStyle: {
|
|
32
32
|
type: [Object, String],
|
|
33
33
|
default: () => defProps.tabbarItem.badgeStyle
|
|
34
|
+
},
|
|
35
|
+
// 模式,默认普通模式,midButton中间按钮模式
|
|
36
|
+
mode: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: () => defProps.tabbarItem.mode
|
|
34
39
|
}
|
|
35
|
-
|
|
36
40
|
}
|
|
37
41
|
})
|
|
@@ -2,14 +2,20 @@
|
|
|
2
2
|
<view
|
|
3
3
|
class="u-tabbar-item"
|
|
4
4
|
:style="[addStyle(customStyle)]"
|
|
5
|
+
:class="[isMidButton ? 'u-tabbar-item--mid-button' : '']"
|
|
5
6
|
@tap="clickHandler"
|
|
6
7
|
>
|
|
7
|
-
<view
|
|
8
|
+
<view
|
|
9
|
+
class="u-tabbar-item__icon"
|
|
10
|
+
:class="[isMidButton ? 'u-tabbar-item__icon--mid-button' : '']"
|
|
11
|
+
>
|
|
12
|
+
<view class="u-tabbar-item--mid-button-cover" v-if="isMidButton">
|
|
13
|
+
</view>
|
|
8
14
|
<up-icon
|
|
9
15
|
v-if="icon"
|
|
10
16
|
:name="icon"
|
|
11
17
|
:color="isActive? parentData.activeColor : parentData.inactiveColor"
|
|
12
|
-
:size="20"
|
|
18
|
+
:size="isMidButton ? 26 : 20"
|
|
13
19
|
></up-icon>
|
|
14
20
|
<template v-else>
|
|
15
21
|
<slot
|
|
@@ -78,6 +84,12 @@
|
|
|
78
84
|
options: {
|
|
79
85
|
virtualHost: true //将自定义节点设置成虚拟的,更加接近Vue组件的表现。我们不希望自定义组件的这个节点本身可以设置样式、响应 flex 布局等
|
|
80
86
|
},
|
|
87
|
+
computed: {
|
|
88
|
+
// 计算是否为中间按钮
|
|
89
|
+
isMidButton() {
|
|
90
|
+
return this.mode === 'midButton';
|
|
91
|
+
}
|
|
92
|
+
},
|
|
81
93
|
created() {
|
|
82
94
|
this.init()
|
|
83
95
|
},
|
|
@@ -88,7 +100,7 @@
|
|
|
88
100
|
// 支付宝小程序不支持provide/inject,所以使用这个方法获取整个父组件,在created定义,避免循环引用
|
|
89
101
|
this.updateParentData()
|
|
90
102
|
if (!this.parent) {
|
|
91
|
-
error('
|
|
103
|
+
error('up-tabbar-item必须搭配up-tabbar组件使用')
|
|
92
104
|
}
|
|
93
105
|
// 本子组件在u-tabbar的children数组中的索引
|
|
94
106
|
const index = this.parent.children.indexOf(this)
|
|
@@ -146,6 +158,34 @@
|
|
|
146
158
|
color: $u-content-color;
|
|
147
159
|
}
|
|
148
160
|
}
|
|
161
|
+
|
|
162
|
+
// 中间按钮样式
|
|
163
|
+
.u-tabbar-item--mid-button {
|
|
164
|
+
/* #ifndef APP-NVUE */
|
|
165
|
+
transform: translateY(-10px);
|
|
166
|
+
/* #endif */
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.u-tabbar-item--mid-button-cover {
|
|
170
|
+
background-color: #fff;
|
|
171
|
+
position: absolute;
|
|
172
|
+
top: 22px;
|
|
173
|
+
left: -10px;
|
|
174
|
+
// right: -10px;
|
|
175
|
+
width: 90px;
|
|
176
|
+
bottom: 0;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.u-tabbar-item__icon--mid-button {
|
|
180
|
+
width: 70px;
|
|
181
|
+
height: 70px;
|
|
182
|
+
border-radius: 100px;
|
|
183
|
+
background-color: #ffffff;
|
|
184
|
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
|
185
|
+
display: flex;
|
|
186
|
+
align-items: center;
|
|
187
|
+
justify-content: center;
|
|
188
|
+
}
|
|
149
189
|
|
|
150
190
|
/* #ifdef MP */
|
|
151
191
|
// 由于小程序都使用shadow DOM形式实现,需要给影子宿主设置flex: 1才能让其撑开
|
|
@@ -154,4 +194,4 @@
|
|
|
154
194
|
width: 100%;
|
|
155
195
|
}
|
|
156
196
|
/* #endif */
|
|
157
|
-
</style>
|
|
197
|
+
</style>
|
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.5.
|
|
5
|
+
"version": "3.5.16",
|
|
6
6
|
"description": "零云®uview-plus已兼容vue3支持多语言,100+全面的组件和便捷的工具会让您信手拈来。近期新增拖动排序、条码、图片裁剪、下拉刷新、虚拟列表、签名、Markdown等。",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"uview",
|