uview-plus 3.8.37 → 3.8.39
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/README.md +2 -0
- package/changelog.md +13 -0
- package/components/u-tabbar/props.js +35 -0
- package/components/u-tabbar/tabbar.js +8 -1
- package/components/u-tabbar/u-tabbar.vue +82 -4
- package/components/u-tabbar-item/props.js +51 -1
- package/components/u-tabbar-item/tabbarItem.js +11 -1
- package/components/u-tabbar-item/u-tabbar-item.vue +327 -58
- package/libs/root/LICENSE +21 -0
- package/package.json +1 -1
package/README.md
CHANGED
package/changelog.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## 3.8.39(2026-05-27)
|
|
2
|
+
feat: 新增 tabbar 风格体系与动态图标表现
|
|
3
|
+
|
|
4
|
+
- 为 tabbar 增加多种内置风格、轻量选中动画与双态图标支持。
|
|
5
|
+
- 扩展示例页覆盖普通场景、NVUE 场景及中间按钮组合用法。
|
|
6
|
+
|
|
7
|
+
## 3.8.38(2026-05-25)
|
|
8
|
+
add: uni-ku/root上游组建的协议原文
|
|
9
|
+
|
|
1
10
|
## 3.8.37(2026-05-22)
|
|
2
11
|
feat: 日历组件新增今天按钮并支持快速回到当月
|
|
3
12
|
|
|
@@ -2118,3 +2127,7 @@ fix: #261u-input在直接修改v-model的绑定值时,每隔一次会无法出
|
|
|
2118
2127
|
增加插件市场地址
|
|
2119
2128
|
## 3.0.0(2022-07-09)
|
|
2120
2129
|
# uview-plus(vue3)初步发布
|
|
2130
|
+
## 3.8.39
|
|
2131
|
+
|
|
2132
|
+
- feat: tabbar 新增多种风格预设、动态图标切换与轻量选中动画
|
|
2133
|
+
- improvment: tabbar 补充高颜值本地图标示例并优化发布型底栏视觉
|
|
@@ -52,6 +52,41 @@ export const props = defineMixin({
|
|
|
52
52
|
backgroundColor: {
|
|
53
53
|
type: String,
|
|
54
54
|
default: () => defProps.tabbar.backgroundColor
|
|
55
|
+
},
|
|
56
|
+
// 风格类型
|
|
57
|
+
styleType: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: () => defProps.tabbar.styleType
|
|
60
|
+
},
|
|
61
|
+
// 激活动画类型
|
|
62
|
+
animationType: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: () => defProps.tabbar.animationType
|
|
65
|
+
},
|
|
66
|
+
// 选中项背景色
|
|
67
|
+
activeBackgroundColor: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: () => defProps.tabbar.activeBackgroundColor
|
|
70
|
+
},
|
|
71
|
+
// 未选中项背景色
|
|
72
|
+
inactiveBackgroundColor: {
|
|
73
|
+
type: String,
|
|
74
|
+
default: () => defProps.tabbar.inactiveBackgroundColor
|
|
75
|
+
},
|
|
76
|
+
// item 形状
|
|
77
|
+
itemShape: {
|
|
78
|
+
type: String,
|
|
79
|
+
default: () => defProps.tabbar.itemShape
|
|
80
|
+
},
|
|
81
|
+
// 图标缩放比例
|
|
82
|
+
iconScale: {
|
|
83
|
+
type: [String, Number],
|
|
84
|
+
default: () => defProps.tabbar.iconScale
|
|
85
|
+
},
|
|
86
|
+
// 文本显示模式
|
|
87
|
+
textMode: {
|
|
88
|
+
type: String,
|
|
89
|
+
default: () => defProps.tabbar.textMode
|
|
55
90
|
}
|
|
56
91
|
}
|
|
57
92
|
})
|
|
@@ -19,6 +19,13 @@ export default {
|
|
|
19
19
|
fixed: true,
|
|
20
20
|
placeholder: true,
|
|
21
21
|
borderColor: '',
|
|
22
|
-
backgroundColor: ''
|
|
22
|
+
backgroundColor: '',
|
|
23
|
+
styleType: 'default',
|
|
24
|
+
animationType: 'none',
|
|
25
|
+
activeBackgroundColor: '',
|
|
26
|
+
inactiveBackgroundColor: '',
|
|
27
|
+
itemShape: 'default',
|
|
28
|
+
iconScale: 1.1,
|
|
29
|
+
textMode: 'always'
|
|
23
30
|
}
|
|
24
31
|
}
|
|
@@ -4,10 +4,21 @@
|
|
|
4
4
|
class="u-tabbar__content"
|
|
5
5
|
ref="u-tabbar__content"
|
|
6
6
|
@touchmove.stop.prevent="noop"
|
|
7
|
-
:class="[
|
|
7
|
+
:class="[
|
|
8
|
+
border && 'u-border-top',
|
|
9
|
+
fixed && 'u-tabbar--fixed',
|
|
10
|
+
`u-tabbar--${styleType}`,
|
|
11
|
+
textMode === 'active' && 'u-tabbar--text-active'
|
|
12
|
+
]"
|
|
8
13
|
:style="[tabbarStyle]"
|
|
9
14
|
>
|
|
10
|
-
<view
|
|
15
|
+
<view
|
|
16
|
+
class="u-tabbar__content__item-wrapper"
|
|
17
|
+
:class="[
|
|
18
|
+
`u-tabbar__content__item-wrapper--${styleType}`,
|
|
19
|
+
itemShape !== 'default' && `u-tabbar__content__item-wrapper--shape-${itemShape}`
|
|
20
|
+
]"
|
|
21
|
+
>
|
|
11
22
|
<slot />
|
|
12
23
|
</view>
|
|
13
24
|
<u-safe-bottom v-if="safeAreaInsetBottom"></u-safe-bottom>
|
|
@@ -59,19 +70,36 @@
|
|
|
59
70
|
tabbarStyle() {
|
|
60
71
|
const style = {
|
|
61
72
|
zIndex: this.zIndex,
|
|
62
|
-
backgroundColor: this.backgroundColor || this.upThemeVar('--up-card-bg-color', this.upThemeIsDark ? '#1c1c1e' : '#ffffff')
|
|
73
|
+
backgroundColor: this.backgroundColor || this.upThemeVar('--up-card-bg-color', this.upThemeIsDark ? '#1c1c1e' : '#ffffff'),
|
|
74
|
+
'--up-tabbar-active-bg': this.activeBackgroundColor || 'transparent',
|
|
75
|
+
'--up-tabbar-inactive-bg': this.inactiveBackgroundColor || 'transparent',
|
|
76
|
+
'--up-tabbar-icon-scale': `${this.iconScale}`
|
|
63
77
|
}
|
|
64
78
|
if (this.borderColor) {
|
|
65
79
|
style.borderColor = this.borderColor + ' !important'
|
|
66
80
|
} else {
|
|
67
81
|
style.borderColor = this.upThemeVar('--up-border-color', '#dadbde')
|
|
68
82
|
}
|
|
83
|
+
if (['pill', 'card', 'glow', 'convex'].includes(this.styleType)) {
|
|
84
|
+
style.padding = '8rpx 12rpx 12rpx'
|
|
85
|
+
}
|
|
69
86
|
// 合并来自父组件的customStyle样式
|
|
70
87
|
return deepMerge(style, addStyle(this.customStyle))
|
|
71
88
|
},
|
|
72
89
|
// 监听多个参数的变化,通过在computed执行对应的操作
|
|
73
90
|
updateChild() {
|
|
74
|
-
return [
|
|
91
|
+
return [
|
|
92
|
+
this.value,
|
|
93
|
+
this.activeColor,
|
|
94
|
+
this.inactiveColor,
|
|
95
|
+
this.styleType,
|
|
96
|
+
this.animationType,
|
|
97
|
+
this.activeBackgroundColor,
|
|
98
|
+
this.inactiveBackgroundColor,
|
|
99
|
+
this.itemShape,
|
|
100
|
+
this.iconScale,
|
|
101
|
+
this.textMode
|
|
102
|
+
]
|
|
75
103
|
},
|
|
76
104
|
updatePlaceholder() {
|
|
77
105
|
return [this.fixed, this.placeholder]
|
|
@@ -138,9 +166,59 @@
|
|
|
138
166
|
height: 50px;
|
|
139
167
|
@include flex(row);
|
|
140
168
|
justify-content: space-around;
|
|
169
|
+
|
|
170
|
+
&--pill,
|
|
171
|
+
&--card,
|
|
172
|
+
&--glow,
|
|
173
|
+
&--convex {
|
|
174
|
+
gap: 8rpx;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
&--pill {
|
|
178
|
+
height: 50px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
&--shape-round {
|
|
182
|
+
border-radius: 999px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
&--shape-square {
|
|
186
|
+
border-radius: 16rpx;
|
|
187
|
+
}
|
|
141
188
|
}
|
|
142
189
|
}
|
|
143
190
|
|
|
191
|
+
&--default,
|
|
192
|
+
&--minimal,
|
|
193
|
+
&--underline,
|
|
194
|
+
&--dot {
|
|
195
|
+
padding: 0;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
&--pill,
|
|
199
|
+
&--glow {
|
|
200
|
+
border-radius: 72rpx;
|
|
201
|
+
background: #ffffff;
|
|
202
|
+
margin-left: 24rpx;
|
|
203
|
+
margin-right: 24rpx;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
&--card {
|
|
207
|
+
border-radius: 24rpx;
|
|
208
|
+
box-shadow: 0 10rpx 30rpx rgba(15, 23, 42, 0.06);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
&--lift {
|
|
212
|
+
overflow: visible;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&--convex {
|
|
216
|
+
overflow: visible;
|
|
217
|
+
border-radius: 32rpx 32rpx 0 0;
|
|
218
|
+
background: #ffffff;
|
|
219
|
+
box-shadow: 0 -2rpx 18rpx rgba(148, 163, 184, 0.08);
|
|
220
|
+
}
|
|
221
|
+
|
|
144
222
|
&--fixed {
|
|
145
223
|
position: fixed;
|
|
146
224
|
bottom: 0;
|
|
@@ -9,9 +9,19 @@ export const props = defineMixin({
|
|
|
9
9
|
},
|
|
10
10
|
// uview-plus内置图标或者绝对路径的图片
|
|
11
11
|
icon: {
|
|
12
|
-
|
|
12
|
+
type: String,
|
|
13
13
|
default: () => defProps.tabbarItem.icon
|
|
14
14
|
},
|
|
15
|
+
// 激活态图标
|
|
16
|
+
activeIcon: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: () => defProps.tabbarItem.activeIcon
|
|
19
|
+
},
|
|
20
|
+
// 未激活态图标
|
|
21
|
+
inactiveIcon: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: () => defProps.tabbarItem.inactiveIcon
|
|
24
|
+
},
|
|
15
25
|
// 右上角的角标提示信息
|
|
16
26
|
badge: {
|
|
17
27
|
type: [String, Number, null],
|
|
@@ -36,6 +46,46 @@ export const props = defineMixin({
|
|
|
36
46
|
mode: {
|
|
37
47
|
type: String,
|
|
38
48
|
default: () => defProps.tabbarItem.mode
|
|
49
|
+
},
|
|
50
|
+
// 激活态附加类名
|
|
51
|
+
activeClass: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: () => defProps.tabbarItem.activeClass
|
|
54
|
+
},
|
|
55
|
+
// 未激活态附加类名
|
|
56
|
+
inactiveClass: {
|
|
57
|
+
type: String,
|
|
58
|
+
default: () => defProps.tabbarItem.inactiveClass
|
|
59
|
+
},
|
|
60
|
+
// 中间按钮背景色
|
|
61
|
+
midButtonBgColor: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: () => defProps.tabbarItem.midButtonBgColor
|
|
64
|
+
},
|
|
65
|
+
// 中间按钮图标颜色
|
|
66
|
+
midButtonIconColor: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: () => defProps.tabbarItem.midButtonIconColor
|
|
69
|
+
},
|
|
70
|
+
// 中间按钮图标大小
|
|
71
|
+
midButtonIconSize: {
|
|
72
|
+
type: [String, Number],
|
|
73
|
+
default: () => defProps.tabbarItem.midButtonIconSize
|
|
74
|
+
},
|
|
75
|
+
// 中间按钮阴影
|
|
76
|
+
midButtonBoxShadow: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: () => defProps.tabbarItem.midButtonBoxShadow
|
|
79
|
+
},
|
|
80
|
+
// 中间按钮内层阴影
|
|
81
|
+
midButtonInnerBoxShadow: {
|
|
82
|
+
type: String,
|
|
83
|
+
default: () => defProps.tabbarItem.midButtonInnerBoxShadow
|
|
84
|
+
},
|
|
85
|
+
// 中间按钮垂直偏移(负值为上移)
|
|
86
|
+
midButtonOffsetY: {
|
|
87
|
+
type: [String, Number],
|
|
88
|
+
default: () => defProps.tabbarItem.midButtonOffsetY
|
|
39
89
|
}
|
|
40
90
|
}
|
|
41
91
|
})
|
|
@@ -12,10 +12,20 @@ export default {
|
|
|
12
12
|
tabbarItem: {
|
|
13
13
|
name: null,
|
|
14
14
|
icon: '',
|
|
15
|
+
activeIcon: '',
|
|
16
|
+
inactiveIcon: '',
|
|
15
17
|
badge: null,
|
|
16
18
|
dot: false,
|
|
17
19
|
text: '',
|
|
18
20
|
badgeStyle: 'top: 6px;right:2px;',
|
|
19
|
-
mode: ''
|
|
21
|
+
mode: '',
|
|
22
|
+
activeClass: '',
|
|
23
|
+
inactiveClass: '',
|
|
24
|
+
midButtonBgColor: '',
|
|
25
|
+
midButtonIconColor: '',
|
|
26
|
+
midButtonIconSize: 26,
|
|
27
|
+
midButtonBoxShadow: '',
|
|
28
|
+
midButtonInnerBoxShadow: '',
|
|
29
|
+
midButtonOffsetY: -10
|
|
20
30
|
}
|
|
21
31
|
}
|
|
@@ -1,50 +1,61 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view
|
|
3
3
|
class="u-tabbar-item"
|
|
4
|
-
:style="[addStyle(customStyle)]"
|
|
5
|
-
:class="
|
|
4
|
+
:style="[itemInlineStyle, addStyle(customStyle)]"
|
|
5
|
+
:class="itemClassNames"
|
|
6
6
|
@tap="clickHandler"
|
|
7
7
|
>
|
|
8
|
-
<view
|
|
9
|
-
class="u-tabbar-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
<view class="u-tabbar-item__content" :class="contentClassNames">
|
|
9
|
+
<view class="u-tabbar-item__bubble" :class="bubbleClassNames">
|
|
10
|
+
<view
|
|
11
|
+
class="u-tabbar-item__icon"
|
|
12
|
+
:class="iconClassNames"
|
|
13
|
+
>
|
|
14
|
+
<view v-if="isMidButton" class="u-tabbar-item__mid-button-arc">
|
|
15
|
+
<svg viewBox="0 0 72 72" preserveAspectRatio="none">
|
|
16
|
+
<path d="M 4 36 A 32 32 0 0 1 68 36"></path>
|
|
17
|
+
</svg>
|
|
18
|
+
</view>
|
|
19
|
+
<view v-if="isMidButton" class="u-tabbar-item__mid-button-inner"></view>
|
|
20
|
+
<up-icon
|
|
21
|
+
v-if="resolvedIconName"
|
|
22
|
+
:name="resolvedIconName"
|
|
23
|
+
:color="isMidButton ? resolvedMidButtonIconColor : (isActive ? resolvedActiveColor : resolvedInactiveColor)"
|
|
24
|
+
:size="isMidButton ? midButtonIconSize : 24"
|
|
25
|
+
></up-icon>
|
|
26
|
+
<template v-else>
|
|
27
|
+
<slot
|
|
28
|
+
v-if="isActive"
|
|
29
|
+
name="active-icon"
|
|
30
|
+
/>
|
|
31
|
+
<slot
|
|
32
|
+
v-else
|
|
33
|
+
name="inactive-icon"
|
|
34
|
+
/>
|
|
35
|
+
</template>
|
|
36
|
+
<u-badge
|
|
37
|
+
absolute
|
|
38
|
+
:offset="[0, dot ? '34rpx' : badge > 9 ? '14rpx' : '20rpx']"
|
|
39
|
+
:customStyle="badgeStyle"
|
|
40
|
+
:isDot="dot"
|
|
41
|
+
:value="badge || (dot ? 1 : null)"
|
|
42
|
+
:show="dot || badge > 0"
|
|
43
|
+
></u-badge>
|
|
44
|
+
</view>
|
|
45
|
+
|
|
46
|
+
<slot name="text">
|
|
47
|
+
<text
|
|
48
|
+
class="u-tabbar-item__text"
|
|
49
|
+
:class="textClassNames"
|
|
50
|
+
:style="{
|
|
51
|
+
color: isActive ? resolvedActiveColor : resolvedInactiveColor
|
|
52
|
+
}"
|
|
53
|
+
>{{ text }}</text>
|
|
54
|
+
</slot>
|
|
13
55
|
</view>
|
|
14
|
-
<up-icon
|
|
15
|
-
v-if="icon"
|
|
16
|
-
:name="icon"
|
|
17
|
-
:color="isActive ? resolvedActiveColor : resolvedInactiveColor"
|
|
18
|
-
:size="isMidButton ? 26 : 20"
|
|
19
|
-
></up-icon>
|
|
20
|
-
<template v-else>
|
|
21
|
-
<slot
|
|
22
|
-
v-if="isActive"
|
|
23
|
-
name="active-icon"
|
|
24
|
-
/>
|
|
25
|
-
<slot
|
|
26
|
-
v-else
|
|
27
|
-
name="inactive-icon"
|
|
28
|
-
/>
|
|
29
|
-
</template>
|
|
30
|
-
<u-badge
|
|
31
|
-
absolute
|
|
32
|
-
:offset="[0, dot ? '34rpx' : badge > 9 ? '14rpx' : '20rpx']"
|
|
33
|
-
:customStyle="badgeStyle"
|
|
34
|
-
:isDot="dot"
|
|
35
|
-
:value="badge || (dot ? 1 : null)"
|
|
36
|
-
:show="dot || badge > 0"
|
|
37
|
-
></u-badge>
|
|
38
56
|
</view>
|
|
39
|
-
|
|
40
|
-
<
|
|
41
|
-
<text
|
|
42
|
-
class="u-tabbar-item__text"
|
|
43
|
-
:style="{
|
|
44
|
-
color: isActive ? resolvedActiveColor : resolvedInactiveColor
|
|
45
|
-
}"
|
|
46
|
-
>{{ text }}</text>
|
|
47
|
-
</slot>
|
|
57
|
+
<view v-if="resolvedStyleType === 'underline'" class="u-tabbar-item__underline"></view>
|
|
58
|
+
<view v-if="resolvedStyleType === 'dot'" class="u-tabbar-item__active-dot"></view>
|
|
48
59
|
</view>
|
|
49
60
|
</template>
|
|
50
61
|
|
|
@@ -76,7 +87,14 @@
|
|
|
76
87
|
parentData: {
|
|
77
88
|
value: null,
|
|
78
89
|
activeColor: '',
|
|
79
|
-
inactiveColor: ''
|
|
90
|
+
inactiveColor: '',
|
|
91
|
+
styleType: 'default',
|
|
92
|
+
animationType: 'none',
|
|
93
|
+
activeBackgroundColor: '',
|
|
94
|
+
inactiveBackgroundColor: '',
|
|
95
|
+
itemShape: 'default',
|
|
96
|
+
iconScale: 1.1,
|
|
97
|
+
textMode: 'always'
|
|
80
98
|
}
|
|
81
99
|
}
|
|
82
100
|
},
|
|
@@ -98,6 +116,67 @@
|
|
|
98
116
|
return !this.parentData.inactiveColor || this.parentData.inactiveColor === '#7d7e80'
|
|
99
117
|
? this.upThemeVar('--up-content-color', '#7d7e80')
|
|
100
118
|
: this.parentData.inactiveColor
|
|
119
|
+
},
|
|
120
|
+
resolvedStyleType() {
|
|
121
|
+
return this.parentData.styleType || 'default'
|
|
122
|
+
},
|
|
123
|
+
resolvedAnimationType() {
|
|
124
|
+
return this.parentData.animationType || 'none'
|
|
125
|
+
},
|
|
126
|
+
resolvedItemShape() {
|
|
127
|
+
return this.parentData.itemShape || 'default'
|
|
128
|
+
},
|
|
129
|
+
resolvedIconName() {
|
|
130
|
+
if (this.$slots['active-icon'] || this.$slots['inactive-icon']) return ''
|
|
131
|
+
if (this.isActive) return this.activeIcon || this.icon
|
|
132
|
+
return this.inactiveIcon || this.icon
|
|
133
|
+
},
|
|
134
|
+
resolvedMidButtonIconColor() {
|
|
135
|
+
if (this.midButtonIconColor) return this.midButtonIconColor
|
|
136
|
+
return this.isMidButton ? '#3c9cff' : this.resolvedActiveColor
|
|
137
|
+
},
|
|
138
|
+
itemClassNames() {
|
|
139
|
+
return [
|
|
140
|
+
this.isActive ? 'u-tabbar-item--active' : 'u-tabbar-item--inactive',
|
|
141
|
+
this.isMidButton ? 'u-tabbar-item--mid-button' : '',
|
|
142
|
+
`u-tabbar-item--${this.resolvedStyleType}`,
|
|
143
|
+
this.resolvedAnimationType !== 'none' && this.isActive ? `u-tabbar-item--anim-${this.resolvedAnimationType}` : '',
|
|
144
|
+
this.resolvedItemShape !== 'default' ? `u-tabbar-item--shape-${this.resolvedItemShape}` : '',
|
|
145
|
+
this.isActive ? this.activeClass : this.inactiveClass
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
iconClassNames() {
|
|
149
|
+
return [
|
|
150
|
+
this.isMidButton ? 'u-tabbar-item__icon--mid-button' : '',
|
|
151
|
+
`u-tabbar-item__icon--${this.resolvedStyleType}`,
|
|
152
|
+
this.isActive && this.resolvedAnimationType !== 'none' ? `u-tabbar-item__icon--anim-${this.resolvedAnimationType}` : ''
|
|
153
|
+
]
|
|
154
|
+
},
|
|
155
|
+
contentClassNames() {
|
|
156
|
+
return [
|
|
157
|
+
`u-tabbar-item__content--${this.resolvedStyleType}`,
|
|
158
|
+
this.isMidButton ? 'u-tabbar-item__content--mid-button' : ''
|
|
159
|
+
]
|
|
160
|
+
},
|
|
161
|
+
bubbleClassNames() {
|
|
162
|
+
return [
|
|
163
|
+
`u-tabbar-item__bubble--${this.resolvedStyleType}`,
|
|
164
|
+
this.isActive ? 'u-tabbar-item__bubble--active' : '',
|
|
165
|
+
this.isMidButton ? 'u-tabbar-item__bubble--mid-button' : ''
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
textClassNames() {
|
|
169
|
+
return [
|
|
170
|
+
`u-tabbar-item__text--${this.resolvedStyleType}`,
|
|
171
|
+
this.parentData.textMode === 'active' && !this.isActive ? 'u-tabbar-item__text--muted' : ''
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
itemInlineStyle() {
|
|
175
|
+
return {
|
|
176
|
+
backgroundColor: this.isActive
|
|
177
|
+
? (this.parentData.activeBackgroundColor || 'transparent')
|
|
178
|
+
: (this.parentData.inactiveBackgroundColor || 'transparent')
|
|
179
|
+
}
|
|
101
180
|
}
|
|
102
181
|
},
|
|
103
182
|
created() {
|
|
@@ -147,6 +226,7 @@
|
|
|
147
226
|
align-items: center;
|
|
148
227
|
justify-content: center;
|
|
149
228
|
flex: 1;
|
|
229
|
+
position: relative;
|
|
150
230
|
/* #ifndef APP-NVUE */
|
|
151
231
|
width: 100%;
|
|
152
232
|
height: 100%;
|
|
@@ -160,42 +240,231 @@
|
|
|
160
240
|
position: relative;
|
|
161
241
|
width: 150rpx;
|
|
162
242
|
justify-content: center;
|
|
243
|
+
min-height: 46rpx;
|
|
244
|
+
transition: transform 0.22s ease, opacity 0.22s ease;
|
|
245
|
+
|
|
246
|
+
&--pill,
|
|
247
|
+
&--card,
|
|
248
|
+
&--glow,
|
|
249
|
+
&--convex {
|
|
250
|
+
width: 100%;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
&--anim-scale {
|
|
254
|
+
transform: scale(var(--up-tabbar-icon-scale, 1.1));
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
&--anim-lift {
|
|
258
|
+
transform: translateY(-6rpx) scale(var(--up-tabbar-icon-scale, 1.08));
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
&--anim-swing {
|
|
262
|
+
transform: rotate(-10deg) scale(var(--up-tabbar-icon-scale, 1.08));
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
&--anim-pulse {
|
|
266
|
+
transform: scale(var(--up-tabbar-icon-scale, 1.14));
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
&__content {
|
|
271
|
+
@include flex(column);
|
|
272
|
+
align-items: center;
|
|
273
|
+
justify-content: center;
|
|
274
|
+
width: 100%;
|
|
275
|
+
height: 100%;
|
|
276
|
+
|
|
277
|
+
&--mid-button {
|
|
278
|
+
justify-content: center;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
&__bubble {
|
|
283
|
+
@include flex(column);
|
|
284
|
+
align-items: center;
|
|
285
|
+
justify-content: center;
|
|
286
|
+
min-width: 0;
|
|
287
|
+
padding: 0;
|
|
288
|
+
max-width: 100rpx;
|
|
289
|
+
border-radius: 999px;
|
|
290
|
+
transition: background-color 0.22s ease, transform 0.22s ease;
|
|
291
|
+
|
|
292
|
+
&--pill.u-tabbar-item__bubble--active {
|
|
293
|
+
background-color: transparent;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
&--glow.u-tabbar-item__bubble--active {
|
|
297
|
+
background-color: var(--up-tabbar-active-bg, rgba(125, 211, 252, 0.12));
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
&--mid-button {
|
|
301
|
+
padding: 0;
|
|
302
|
+
background-color: transparent !important;
|
|
303
|
+
}
|
|
163
304
|
}
|
|
164
305
|
|
|
165
306
|
&__text {
|
|
166
307
|
margin-top: 2px;
|
|
167
308
|
font-size: 12px;
|
|
168
309
|
color: $u-content-color;
|
|
310
|
+
transition: transform 0.22s ease, opacity 0.22s ease;
|
|
311
|
+
|
|
312
|
+
&--muted {
|
|
313
|
+
opacity: 0.68;
|
|
314
|
+
transform: scale(0.94);
|
|
315
|
+
}
|
|
169
316
|
}
|
|
317
|
+
|
|
318
|
+
&__underline {
|
|
319
|
+
position: absolute;
|
|
320
|
+
left: 50%;
|
|
321
|
+
bottom: 2rpx;
|
|
322
|
+
width: 34rpx;
|
|
323
|
+
height: 6rpx;
|
|
324
|
+
border-radius: 999px;
|
|
325
|
+
background-color: currentColor;
|
|
326
|
+
transform: translateX(-50%);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
&__active-dot {
|
|
330
|
+
position: absolute;
|
|
331
|
+
left: 50%;
|
|
332
|
+
bottom: 8rpx;
|
|
333
|
+
width: 10rpx;
|
|
334
|
+
height: 10rpx;
|
|
335
|
+
border-radius: 50%;
|
|
336
|
+
background-color: currentColor;
|
|
337
|
+
transform: translateX(-50%);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.u-tabbar-item--active {
|
|
342
|
+
color: inherit;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.u-tabbar-item--pill,
|
|
346
|
+
.u-tabbar-item--glow,
|
|
347
|
+
.u-tabbar-item--card {
|
|
348
|
+
margin: 0;
|
|
349
|
+
border-radius: 999px;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.u-tabbar-item--card {
|
|
353
|
+
border-radius: 24rpx;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.u-tabbar-item--active.u-tabbar-item--pill,
|
|
357
|
+
.u-tabbar-item--active.u-tabbar-item--card {
|
|
358
|
+
box-shadow: none;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.u-tabbar-item--active.u-tabbar-item--glow {
|
|
362
|
+
box-shadow: none;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.u-tabbar-item--lift.u-tabbar-item--active {
|
|
366
|
+
transform: none;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.u-tabbar-item--lift.u-tabbar-item--active .u-tabbar-item__icon {
|
|
370
|
+
transform: translateY(-6rpx) scale(1.04);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.u-tabbar-item--underline,
|
|
374
|
+
.u-tabbar-item--dot {
|
|
375
|
+
padding-bottom: 10rpx;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.u-tabbar-item--convex.u-tabbar-item--active:not(.u-tabbar-item--mid-button) {
|
|
379
|
+
transform: none;
|
|
170
380
|
}
|
|
171
381
|
|
|
172
382
|
// 中间按钮样式
|
|
173
383
|
.u-tabbar-item--mid-button {
|
|
174
384
|
/* #ifndef APP-NVUE */
|
|
175
|
-
transform: translateY(-
|
|
385
|
+
transform: translateY(v-bind('`${midButtonOffsetY}px`'));
|
|
176
386
|
/* #endif */
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
.u-tabbar-item--mid-button-cover {
|
|
180
|
-
background-color: var(--up-card-bg-color, #fff);
|
|
181
|
-
position: absolute;
|
|
182
|
-
top: 22px;
|
|
183
|
-
left: -10px;
|
|
184
|
-
// right: -10px;
|
|
185
|
-
width: 90px;
|
|
186
|
-
bottom: 0;
|
|
387
|
+
z-index: 2;
|
|
388
|
+
flex: 1;
|
|
187
389
|
}
|
|
188
390
|
|
|
189
391
|
.u-tabbar-item__icon--mid-button {
|
|
190
|
-
width:
|
|
191
|
-
height:
|
|
192
|
-
border-radius:
|
|
193
|
-
background
|
|
194
|
-
box-shadow:
|
|
195
|
-
border: 1px solid var(--up-border-color, rgba(0, 0, 0, 0.08));
|
|
392
|
+
width: 64px;
|
|
393
|
+
height: 64px;
|
|
394
|
+
border-radius: 999px;
|
|
395
|
+
background: #ffffff;
|
|
396
|
+
box-shadow: v-bind('midButtonBoxShadow || "none"');
|
|
196
397
|
display: flex;
|
|
197
398
|
align-items: center;
|
|
198
399
|
justify-content: center;
|
|
400
|
+
position: relative;
|
|
401
|
+
overflow: visible;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.u-tabbar-item__mid-button-arc {
|
|
405
|
+
position: absolute;
|
|
406
|
+
left: -4px;
|
|
407
|
+
top: -4px;
|
|
408
|
+
width: calc(100% + 8px);
|
|
409
|
+
height: calc(100% + 8px);
|
|
410
|
+
pointer-events: none;
|
|
411
|
+
z-index: 0;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.u-tabbar-item__mid-button-arc svg {
|
|
415
|
+
width: 100%;
|
|
416
|
+
height: 100%;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
.u-tabbar-item__mid-button-arc path {
|
|
420
|
+
fill: none;
|
|
421
|
+
stroke: none;
|
|
422
|
+
stroke-width: 0;
|
|
423
|
+
stroke-linecap: round;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.u-tabbar-item__mid-button-inner {
|
|
427
|
+
position: absolute;
|
|
428
|
+
left: 6px;
|
|
429
|
+
top: 6px;
|
|
430
|
+
right: 6px;
|
|
431
|
+
bottom: 6px;
|
|
432
|
+
border-radius: 999px;
|
|
433
|
+
background: v-bind('midButtonBgColor || "#ffffff"');
|
|
434
|
+
box-shadow: v-bind('midButtonInnerBoxShadow');
|
|
435
|
+
z-index: 1;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.u-tabbar-item__icon--mid-button .u-icon,
|
|
439
|
+
.u-tabbar-item__icon--mid-button .u-badge {
|
|
440
|
+
position: relative;
|
|
441
|
+
z-index: 2;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.u-tabbar-item--mid-button .u-tabbar-item__text {
|
|
445
|
+
margin-top: 0;
|
|
446
|
+
transform: translateY(-4px);
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
.u-tabbar-item--lift .u-tabbar-item__bubble {
|
|
450
|
+
background-color: transparent !important;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
.u-tabbar-item--lift.u-tabbar-item--active .u-tabbar-item__text {
|
|
454
|
+
transform: translateY(-4rpx);
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.u-tabbar-item--anim-pulse .u-tabbar-item__icon {
|
|
458
|
+
animation: u-tabbar-item-pulse 1.4s ease-in-out infinite;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
@keyframes u-tabbar-item-pulse {
|
|
462
|
+
0%, 100% {
|
|
463
|
+
transform: scale(var(--up-tabbar-icon-scale, 1.1));
|
|
464
|
+
}
|
|
465
|
+
50% {
|
|
466
|
+
transform: scale(calc(var(--up-tabbar-icon-scale, 1.1) + 0.08));
|
|
467
|
+
}
|
|
199
468
|
}
|
|
200
469
|
|
|
201
470
|
/* #ifdef MP */
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-present, Skiyee (Sky)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
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.8.
|
|
5
|
+
"version": "3.8.39",
|
|
6
6
|
"description": "零云®uview-plus已兼容vue3支持多语言,120+全面的组件和便捷的工具会让您信手拈来。近期新增拖动排序、条码、图片裁剪、下拉刷新、虚拟列表、签名、Markdown等。",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"uview",
|