@atooyu/uxto-ui 1.0.5 → 1.0.7
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/dist/index.js +156 -129
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +156 -129
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +43 -57
- package/package.json +1 -1
- package/src/components/u-icon/icons/account-fill.svg +3 -0
- package/src/components/u-icon/icons/home-fill.svg +3 -0
- package/src/components/u-icon/icons/home.svg +3 -0
- package/src/components/u-icon/icons/user-fill.svg +3 -0
- package/src/components/u-icon/index.ts +10 -0
- package/src/components/u-swiper/u-swiper.vue +2 -2
- package/src/components/u-tabbar/u-tabbar.vue +150 -123
package/dist/style.css
CHANGED
|
@@ -1027,16 +1027,16 @@ to {
|
|
|
1027
1027
|
font-size: 10px;
|
|
1028
1028
|
line-height: 1;
|
|
1029
1029
|
color: #ffffff;
|
|
1030
|
-
}.u-swiper[data-v-
|
|
1030
|
+
}.u-swiper[data-v-aa989e67] {
|
|
1031
1031
|
position: relative;
|
|
1032
1032
|
width: 100%;
|
|
1033
1033
|
overflow: hidden;
|
|
1034
1034
|
}
|
|
1035
|
-
.u-swiper__wrapper[data-v-
|
|
1035
|
+
.u-swiper__wrapper[data-v-aa989e67] {
|
|
1036
1036
|
width: 100%;
|
|
1037
1037
|
height: var(--swiper-height, 200px);
|
|
1038
1038
|
}
|
|
1039
|
-
.u-swiper__loading[data-v-
|
|
1039
|
+
.u-swiper__loading[data-v-aa989e67] {
|
|
1040
1040
|
position: absolute;
|
|
1041
1041
|
top: 0;
|
|
1042
1042
|
left: 0;
|
|
@@ -1048,20 +1048,20 @@ to {
|
|
|
1048
1048
|
background-color: rgba(0, 0, 0, 0.3);
|
|
1049
1049
|
z-index: 10;
|
|
1050
1050
|
}
|
|
1051
|
-
.u-swiper__loading-icon[data-v-
|
|
1051
|
+
.u-swiper__loading-icon[data-v-aa989e67] {
|
|
1052
1052
|
width: 32px;
|
|
1053
1053
|
height: 32px;
|
|
1054
1054
|
border: 3px solid rgba(255, 255, 255, 0.3);
|
|
1055
1055
|
border-top-color: #fff;
|
|
1056
1056
|
border-radius: 50%;
|
|
1057
|
-
animation: u-swiper-loading-
|
|
1057
|
+
animation: u-swiper-loading-aa989e67 0.8s linear infinite;
|
|
1058
1058
|
}
|
|
1059
|
-
@keyframes u-swiper-loading-
|
|
1059
|
+
@keyframes u-swiper-loading-aa989e67 {
|
|
1060
1060
|
to {
|
|
1061
1061
|
transform: rotate(360deg);
|
|
1062
1062
|
}
|
|
1063
1063
|
}
|
|
1064
|
-
.u-swiper__title[data-v-
|
|
1064
|
+
.u-swiper__title[data-v-aa989e67] {
|
|
1065
1065
|
position: absolute;
|
|
1066
1066
|
left: 0;
|
|
1067
1067
|
right: 0;
|
|
@@ -1070,41 +1070,41 @@ to {
|
|
|
1070
1070
|
background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.5));
|
|
1071
1071
|
z-index: 5;
|
|
1072
1072
|
}
|
|
1073
|
-
.u-swiper__title-text[data-v-
|
|
1073
|
+
.u-swiper__title-text[data-v-aa989e67] {
|
|
1074
1074
|
font-size: 14px;
|
|
1075
1075
|
color: #ffffff;
|
|
1076
1076
|
line-height: 1.4;
|
|
1077
1077
|
}
|
|
1078
|
-
.u-swiper__indicator[data-v-
|
|
1078
|
+
.u-swiper__indicator[data-v-aa989e67] {
|
|
1079
1079
|
position: absolute;
|
|
1080
1080
|
z-index: 5;
|
|
1081
1081
|
}
|
|
1082
|
-
.u-swiper__indicator-wrapper[data-v-
|
|
1082
|
+
.u-swiper__indicator-wrapper[data-v-aa989e67] {
|
|
1083
1083
|
position: absolute;
|
|
1084
1084
|
display: flex;
|
|
1085
1085
|
z-index: 5;
|
|
1086
1086
|
padding: 4px 8px;
|
|
1087
1087
|
}
|
|
1088
|
-
.u-swiper__indicator-wrapper--top-left[data-v-
|
|
1088
|
+
.u-swiper__indicator-wrapper--top-left[data-v-aa989e67] {
|
|
1089
1089
|
top: 0;
|
|
1090
1090
|
left: 0;
|
|
1091
1091
|
}
|
|
1092
|
-
.u-swiper__indicator-wrapper--top-right[data-v-
|
|
1092
|
+
.u-swiper__indicator-wrapper--top-right[data-v-aa989e67] {
|
|
1093
1093
|
top: 0;
|
|
1094
1094
|
right: 0;
|
|
1095
1095
|
}
|
|
1096
|
-
.u-swiper__indicator-wrapper--bottom-left[data-v-
|
|
1096
|
+
.u-swiper__indicator-wrapper--bottom-left[data-v-aa989e67] {
|
|
1097
1097
|
bottom: 0;
|
|
1098
1098
|
left: 0;
|
|
1099
1099
|
}
|
|
1100
|
-
.u-swiper__indicator-wrapper--bottom-right[data-v-
|
|
1100
|
+
.u-swiper__indicator-wrapper--bottom-right[data-v-aa989e67] {
|
|
1101
1101
|
bottom: 0;
|
|
1102
1102
|
right: 0;
|
|
1103
1103
|
}
|
|
1104
|
-
.u-swiper__indicator-wrapper--vertical[data-v-
|
|
1104
|
+
.u-swiper__indicator-wrapper--vertical[data-v-aa989e67] {
|
|
1105
1105
|
flex-direction: column;
|
|
1106
1106
|
}
|
|
1107
|
-
.u-swiper__indicator-item[data-v-
|
|
1107
|
+
.u-swiper__indicator-item[data-v-aa989e67] {
|
|
1108
1108
|
width: 6px;
|
|
1109
1109
|
height: 6px;
|
|
1110
1110
|
border-radius: 50%;
|
|
@@ -1112,17 +1112,17 @@ to {
|
|
|
1112
1112
|
margin: 0 4px;
|
|
1113
1113
|
transition: all 0.3s;
|
|
1114
1114
|
}
|
|
1115
|
-
.u-swiper__indicator-item--active[data-v-
|
|
1115
|
+
.u-swiper__indicator-item--active[data-v-aa989e67] {
|
|
1116
1116
|
width: 16px;
|
|
1117
1117
|
border-radius: 4px;
|
|
1118
1118
|
background-color: var(--indicator-active-color, #fff);
|
|
1119
1119
|
}
|
|
1120
|
-
.u-swiper__indicator-wrapper--vertical .u-swiper__indicator-item[data-v-
|
|
1120
|
+
.u-swiper__indicator-wrapper--vertical .u-swiper__indicator-item[data-v-aa989e67] {
|
|
1121
1121
|
width: 6px;
|
|
1122
1122
|
height: 6px;
|
|
1123
1123
|
margin: 4px 0;
|
|
1124
1124
|
}
|
|
1125
|
-
.u-swiper__indicator-wrapper--vertical .u-swiper__indicator-item--active[data-v-
|
|
1125
|
+
.u-swiper__indicator-wrapper--vertical .u-swiper__indicator-item--active[data-v-aa989e67] {
|
|
1126
1126
|
width: 6px;
|
|
1127
1127
|
height: 16px;
|
|
1128
1128
|
}.u-swiper-item[data-v-ef481687] {
|
|
@@ -2415,20 +2415,22 @@ to {
|
|
|
2415
2415
|
.u-read-more__toggle-icon[data-v-e27ed42c] {
|
|
2416
2416
|
font-size: 12px;
|
|
2417
2417
|
}
|
|
2418
|
-
.u-tabbar[data-v-
|
|
2418
|
+
.u-tabbar[data-v-9b683b39] {
|
|
2419
2419
|
position: fixed;
|
|
2420
2420
|
left: 0;
|
|
2421
2421
|
right: 0;
|
|
2422
2422
|
bottom: 0;
|
|
2423
2423
|
z-index: 999;
|
|
2424
2424
|
width: 100%;
|
|
2425
|
+
pointer-events: none;
|
|
2425
2426
|
}
|
|
2426
|
-
.u-tabbar__nav-wrap[data-v-
|
|
2427
|
+
.u-tabbar__nav-wrap[data-v-9b683b39] {
|
|
2428
|
+
pointer-events: auto;
|
|
2427
2429
|
position: absolute;
|
|
2428
2430
|
left: 14px;
|
|
2429
2431
|
right: 14px;
|
|
2430
2432
|
bottom: calc(10px + env(safe-area-inset-bottom));
|
|
2431
|
-
/*
|
|
2433
|
+
/* 鸿蒙兼容 */
|
|
2432
2434
|
bottom: calc(10px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom)));
|
|
2433
2435
|
z-index: 5;
|
|
2434
2436
|
height: 56px;
|
|
@@ -2441,7 +2443,7 @@ to {
|
|
|
2441
2443
|
padding: 0 8px;
|
|
2442
2444
|
box-sizing: border-box;
|
|
2443
2445
|
}
|
|
2444
|
-
.u-tabbar__tab-btn[data-v-
|
|
2446
|
+
.u-tabbar__tab-btn[data-v-9b683b39] {
|
|
2445
2447
|
flex: 1;
|
|
2446
2448
|
height: 40px;
|
|
2447
2449
|
border-radius: 20px;
|
|
@@ -2456,36 +2458,23 @@ to {
|
|
|
2456
2458
|
overflow: hidden;
|
|
2457
2459
|
min-width: 0;
|
|
2458
2460
|
}
|
|
2459
|
-
.u-tabbar__tab-btn--active[data-v-
|
|
2461
|
+
.u-tabbar__tab-btn--active[data-v-9b683b39] {
|
|
2460
2462
|
background: #ffffff;
|
|
2461
|
-
color: #0c958e;
|
|
2462
2463
|
box-shadow: inset 0 0 0 1px rgba(17, 135, 128, 0.14);
|
|
2463
2464
|
}
|
|
2464
|
-
.u-tabbar__tab-
|
|
2465
|
-
font-size: 16px;
|
|
2466
|
-
font-weight: 700;
|
|
2467
|
-
color: rgba(255, 255, 255, 0.9);
|
|
2468
|
-
flex-shrink: 0;
|
|
2469
|
-
}
|
|
2470
|
-
.u-tabbar__tab-btn--active .u-tabbar__tab-icon[data-v-cdd03f9f] {
|
|
2471
|
-
color: #0c958e;
|
|
2472
|
-
}
|
|
2473
|
-
.u-tabbar__tab-text[data-v-cdd03f9f] {
|
|
2465
|
+
.u-tabbar__tab-text[data-v-9b683b39] {
|
|
2474
2466
|
font-weight: 600;
|
|
2475
|
-
|
|
2467
|
+
font-size: 14px;
|
|
2476
2468
|
overflow: hidden;
|
|
2477
2469
|
text-overflow: ellipsis;
|
|
2478
2470
|
}
|
|
2479
|
-
.u-
|
|
2480
|
-
color: #0c958e;
|
|
2481
|
-
}
|
|
2482
|
-
.u-tabbar__center[data-v-cdd03f9f] {
|
|
2471
|
+
.u-tabbar__center[data-v-9b683b39] {
|
|
2483
2472
|
position: relative;
|
|
2484
2473
|
width: 72px;
|
|
2485
2474
|
height: 56px;
|
|
2486
2475
|
flex-shrink: 0;
|
|
2487
2476
|
}
|
|
2488
|
-
.u-tabbar__center-btn[data-v-
|
|
2477
|
+
.u-tabbar__center-btn[data-v-9b683b39] {
|
|
2489
2478
|
position: absolute;
|
|
2490
2479
|
left: 50%;
|
|
2491
2480
|
top: -22px;
|
|
@@ -2493,36 +2482,33 @@ to {
|
|
|
2493
2482
|
width: 72px;
|
|
2494
2483
|
height: 72px;
|
|
2495
2484
|
border-radius: 50%;
|
|
2496
|
-
border:
|
|
2497
|
-
background:
|
|
2498
|
-
color: #fff;
|
|
2485
|
+
border: 3px solid #9fe4dd;
|
|
2486
|
+
background: #ffffff;
|
|
2499
2487
|
display: flex;
|
|
2500
2488
|
flex-direction: column;
|
|
2501
2489
|
align-items: center;
|
|
2502
2490
|
justify-content: center;
|
|
2503
|
-
gap:
|
|
2504
|
-
box-shadow: 0 8px 20px rgba(8, 112, 106, 0.
|
|
2491
|
+
gap: 2px;
|
|
2492
|
+
box-shadow: 0 8px 20px rgba(8, 112, 106, 0.25);
|
|
2505
2493
|
transition: all 200ms ease;
|
|
2506
2494
|
}
|
|
2507
|
-
.u-tabbar__center-btn[data-v-
|
|
2495
|
+
.u-tabbar__center-btn[data-v-9b683b39]:active {
|
|
2508
2496
|
transform: translateX(-50%) scale(0.95);
|
|
2509
2497
|
}
|
|
2510
|
-
.u-tabbar__center-btn--active[data-v-
|
|
2511
|
-
background: #ffffff;
|
|
2498
|
+
.u-tabbar__center-btn--active[data-v-9b683b39] {
|
|
2512
2499
|
border-color: #12b6af;
|
|
2500
|
+
box-shadow: 0 8px 24px rgba(8, 112, 106, 0.35);
|
|
2513
2501
|
}
|
|
2514
|
-
.u-tabbar__center-
|
|
2515
|
-
.u-tabbar__center-btn--active .u-tabbar__center-text[data-v-cdd03f9f] {
|
|
2516
|
-
color: #12b6af;
|
|
2517
|
-
}
|
|
2518
|
-
.u-tabbar__center-brand[data-v-cdd03f9f] {
|
|
2502
|
+
.u-tabbar__center-brand[data-v-9b683b39] {
|
|
2519
2503
|
font-size: 22px;
|
|
2520
2504
|
line-height: 1;
|
|
2521
2505
|
font-weight: 700;
|
|
2522
|
-
color: #
|
|
2506
|
+
color: #12b6af;
|
|
2507
|
+
letter-spacing: 1px;
|
|
2523
2508
|
}
|
|
2524
|
-
.u-tabbar__center-text[data-v-
|
|
2509
|
+
.u-tabbar__center-text[data-v-9b683b39] {
|
|
2525
2510
|
font-size: 12px;
|
|
2526
2511
|
letter-spacing: 0.5px;
|
|
2527
|
-
color: #
|
|
2512
|
+
color: #12b6af;
|
|
2513
|
+
font-weight: 500;
|
|
2528
2514
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill="currentColor" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill="currentColor" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/>
|
|
3
|
+
</svg>
|
|
@@ -71,6 +71,10 @@ import upload from './icons/upload.svg'
|
|
|
71
71
|
import user from './icons/user.svg'
|
|
72
72
|
import account from './icons/account.svg'
|
|
73
73
|
import group from './icons/group.svg'
|
|
74
|
+
import home from './icons/home.svg'
|
|
75
|
+
import homeFill from './icons/home-fill.svg'
|
|
76
|
+
import accountFill from './icons/account-fill.svg'
|
|
77
|
+
import userFill from './icons/user-fill.svg'
|
|
74
78
|
import warning from './icons/warning.svg'
|
|
75
79
|
import warningO from './icons/warning-o.svg'
|
|
76
80
|
import zoomIn from './icons/zoom-in.svg'
|
|
@@ -145,11 +149,17 @@ export const icons: Record<string, string> = {
|
|
|
145
149
|
|
|
146
150
|
// 用户类
|
|
147
151
|
'user': user,
|
|
152
|
+
'user-fill': userFill,
|
|
148
153
|
'account': account,
|
|
154
|
+
'account-fill': accountFill,
|
|
149
155
|
'group': group,
|
|
150
156
|
'smile': smile,
|
|
151
157
|
'smile-o': smileO,
|
|
152
158
|
|
|
159
|
+
// 导航类 - 新增首页图标
|
|
160
|
+
'home': home,
|
|
161
|
+
'home-fill': homeFill,
|
|
162
|
+
|
|
153
163
|
// 安全类
|
|
154
164
|
'lock': lock,
|
|
155
165
|
'unlock': unlock,
|
|
@@ -113,10 +113,10 @@ const indicatorStyle = computed(() => {
|
|
|
113
113
|
const style: Record<string, string> = {}
|
|
114
114
|
|
|
115
115
|
if (props.indicatorColor) {
|
|
116
|
-
style
|
|
116
|
+
style['--indicator-color'] = props.indicatorColor
|
|
117
117
|
}
|
|
118
118
|
if (props.indicatorActiveColor) {
|
|
119
|
-
style
|
|
119
|
+
style['--indicator-active-color'] = props.indicatorActiveColor
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
return style
|
|
@@ -8,8 +8,18 @@
|
|
|
8
8
|
:class="{ 'u-tabbar__tab-btn--active': modelValue === leftTab.value }"
|
|
9
9
|
@click="switchTab(leftTab.value)"
|
|
10
10
|
>
|
|
11
|
-
<
|
|
12
|
-
|
|
11
|
+
<u-icon
|
|
12
|
+
v-if="leftTab.icon"
|
|
13
|
+
:name="leftTab.icon"
|
|
14
|
+
:size="16"
|
|
15
|
+
:color="modelValue === leftTab.value ? activeColor : inactiveColor"
|
|
16
|
+
/>
|
|
17
|
+
<text
|
|
18
|
+
class="u-tabbar__tab-text"
|
|
19
|
+
:style="{ color: modelValue === leftTab.value ? activeColor : inactiveColor }"
|
|
20
|
+
>
|
|
21
|
+
{{ leftTab.label }}
|
|
22
|
+
</text>
|
|
13
23
|
</view>
|
|
14
24
|
|
|
15
25
|
<!-- 中间占位 + 凸起按钮 -->
|
|
@@ -19,8 +29,12 @@
|
|
|
19
29
|
:class="{ 'u-tabbar__center-btn--active': modelValue === centerTab.value }"
|
|
20
30
|
@click="switchTab(centerTab.value)"
|
|
21
31
|
>
|
|
22
|
-
<text class="u-tabbar__center-brand"
|
|
23
|
-
|
|
32
|
+
<text class="u-tabbar__center-brand" :style="{ color: modelValue === centerTab.value ? activeColor : '#ffffff' }">
|
|
33
|
+
{{ centerBrand }}
|
|
34
|
+
</text>
|
|
35
|
+
<text class="u-tabbar__center-text" :style="{ color: modelValue === centerTab.value ? activeColor : '#ffffff' }">
|
|
36
|
+
{{ centerLabel }}
|
|
37
|
+
</text>
|
|
24
38
|
</view>
|
|
25
39
|
</view>
|
|
26
40
|
|
|
@@ -30,36 +44,63 @@
|
|
|
30
44
|
:class="{ 'u-tabbar__tab-btn--active': modelValue === rightTab.value }"
|
|
31
45
|
@click="switchTab(rightTab.value)"
|
|
32
46
|
>
|
|
33
|
-
<
|
|
34
|
-
|
|
47
|
+
<u-icon
|
|
48
|
+
v-if="rightTab.icon"
|
|
49
|
+
:name="rightTab.icon"
|
|
50
|
+
:size="16"
|
|
51
|
+
:color="modelValue === rightTab.value ? activeColor : inactiveColor"
|
|
52
|
+
/>
|
|
53
|
+
<text
|
|
54
|
+
class="u-tabbar__tab-text"
|
|
55
|
+
:style="{ color: modelValue === rightTab.value ? activeColor : inactiveColor }"
|
|
56
|
+
>
|
|
57
|
+
{{ rightTab.label }}
|
|
58
|
+
</text>
|
|
35
59
|
</view>
|
|
36
60
|
</view>
|
|
37
61
|
</view>
|
|
38
62
|
</template>
|
|
39
63
|
|
|
40
64
|
<script setup lang="ts">
|
|
41
|
-
|
|
65
|
+
import UIcon from '../u-icon/u-icon.vue'
|
|
66
|
+
|
|
67
|
+
export interface TabItem {
|
|
68
|
+
/** 标签文字 */
|
|
42
69
|
label: string
|
|
43
|
-
|
|
70
|
+
/** 图标名称 */
|
|
71
|
+
icon?: string
|
|
72
|
+
/** 标识值 */
|
|
44
73
|
value: string
|
|
45
74
|
}
|
|
46
75
|
|
|
47
|
-
interface Props {
|
|
76
|
+
export interface Props {
|
|
77
|
+
/** 当前选中的tab值 */
|
|
48
78
|
modelValue?: string
|
|
79
|
+
/** 左侧Tab配置 */
|
|
49
80
|
leftTab?: TabItem
|
|
81
|
+
/** 中间Tab配置 */
|
|
50
82
|
centerTab?: TabItem
|
|
83
|
+
/** 右侧Tab配置 */
|
|
51
84
|
rightTab?: TabItem
|
|
85
|
+
/** 中间品牌文字 */
|
|
52
86
|
centerBrand?: string
|
|
87
|
+
/** 中间标签文字 */
|
|
53
88
|
centerLabel?: string
|
|
89
|
+
/** 激活状态颜色 */
|
|
90
|
+
activeColor?: string
|
|
91
|
+
/** 未激活状态颜色 */
|
|
92
|
+
inactiveColor?: string
|
|
54
93
|
}
|
|
55
94
|
|
|
56
95
|
const props = withDefaults(defineProps<Props>(), {
|
|
57
96
|
modelValue: 'home',
|
|
58
|
-
leftTab: () => ({ label: '首页', icon: '
|
|
59
|
-
centerTab: () => ({ label: '图域',
|
|
60
|
-
rightTab: () => ({ label: '我的', icon: '
|
|
97
|
+
leftTab: () => ({ label: '首页', icon: 'home-fill', value: 'home' }),
|
|
98
|
+
centerTab: () => ({ label: '图域', value: 'center' }),
|
|
99
|
+
rightTab: () => ({ label: '我的', icon: 'account-fill', value: 'mine' }),
|
|
61
100
|
centerBrand: 'TU',
|
|
62
|
-
centerLabel: '图域'
|
|
101
|
+
centerLabel: '图域',
|
|
102
|
+
activeColor: '#0c958e',
|
|
103
|
+
inactiveColor: '#ffffff'
|
|
63
104
|
})
|
|
64
105
|
|
|
65
106
|
const emit = defineEmits<{
|
|
@@ -67,6 +108,10 @@ const emit = defineEmits<{
|
|
|
67
108
|
'tab-change': [value: string]
|
|
68
109
|
}>()
|
|
69
110
|
|
|
111
|
+
/**
|
|
112
|
+
* 切换tab
|
|
113
|
+
* @param tab - 目标tab值
|
|
114
|
+
*/
|
|
70
115
|
const switchTab = (tab: string) => {
|
|
71
116
|
emit('update:modelValue', tab)
|
|
72
117
|
emit('tab-change', tab)
|
|
@@ -86,6 +131,7 @@ export default {
|
|
|
86
131
|
// 薄荷主题色
|
|
87
132
|
$--mint-1: #12b6af;
|
|
88
133
|
$--mint-2: #9fe4dd;
|
|
134
|
+
$--mint-3: #65d8d1;
|
|
89
135
|
$--ink: #1b4d4a;
|
|
90
136
|
$--paper: #ffffff;
|
|
91
137
|
|
|
@@ -96,126 +142,107 @@ $--paper: #ffffff;
|
|
|
96
142
|
bottom: 0;
|
|
97
143
|
z-index: 999;
|
|
98
144
|
width: 100%;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
// Tab按钮
|
|
122
|
-
.u-tabbar__tab-btn {
|
|
123
|
-
flex: 1;
|
|
124
|
-
height: 40px;
|
|
125
|
-
border-radius: 20px;
|
|
126
|
-
background: transparent;
|
|
127
|
-
display: flex;
|
|
128
|
-
align-items: center;
|
|
129
|
-
justify-content: center;
|
|
130
|
-
gap: 4px;
|
|
131
|
-
font-size: 14px;
|
|
132
|
-
transition: all 200ms ease;
|
|
133
|
-
white-space: nowrap;
|
|
134
|
-
overflow: hidden;
|
|
135
|
-
min-width: 0;
|
|
136
|
-
|
|
137
|
-
&--active {
|
|
138
|
-
background: $--paper;
|
|
139
|
-
color: #0c958e;
|
|
140
|
-
box-shadow: inset 0 0 0 1px rgba(17, 135, 128, 0.14);
|
|
145
|
+
pointer-events: none;
|
|
146
|
+
|
|
147
|
+
&__nav-wrap {
|
|
148
|
+
pointer-events: auto;
|
|
149
|
+
position: absolute;
|
|
150
|
+
left: 14px;
|
|
151
|
+
right: 14px;
|
|
152
|
+
bottom: calc(10px + env(safe-area-inset-bottom));
|
|
153
|
+
/* 鸿蒙兼容 */
|
|
154
|
+
bottom: calc(10px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom)));
|
|
155
|
+
z-index: 5;
|
|
156
|
+
height: 56px;
|
|
157
|
+
border-radius: 28px;
|
|
158
|
+
background: linear-gradient(90deg, $--mint-1 0%, $--mint-2 100%);
|
|
159
|
+
box-shadow: 0 10px 24px rgba(7, 114, 108, 0.3);
|
|
160
|
+
display: flex;
|
|
161
|
+
align-items: center;
|
|
162
|
+
justify-content: space-between;
|
|
163
|
+
padding: 0 8px;
|
|
164
|
+
box-sizing: border-box;
|
|
141
165
|
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.u-tabbar__tab-icon {
|
|
145
|
-
font-size: 16px;
|
|
146
|
-
font-weight: 700;
|
|
147
|
-
color: rgba(255, 255, 255, 0.9);
|
|
148
|
-
flex-shrink: 0;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.u-tabbar__tab-btn--active .u-tabbar__tab-icon {
|
|
152
|
-
color: #0c958e;
|
|
153
|
-
}
|
|
154
166
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
167
|
+
// Tab按钮
|
|
168
|
+
&__tab-btn {
|
|
169
|
+
flex: 1;
|
|
170
|
+
height: 40px;
|
|
171
|
+
border-radius: 20px;
|
|
172
|
+
background: transparent;
|
|
173
|
+
display: flex;
|
|
174
|
+
align-items: center;
|
|
175
|
+
justify-content: center;
|
|
176
|
+
gap: 4px;
|
|
177
|
+
font-size: 14px;
|
|
178
|
+
transition: all 200ms ease;
|
|
179
|
+
white-space: nowrap;
|
|
180
|
+
overflow: hidden;
|
|
181
|
+
min-width: 0;
|
|
182
|
+
|
|
183
|
+
&--active {
|
|
184
|
+
background: $--paper;
|
|
185
|
+
box-shadow: inset 0 0 0 1px rgba(17, 135, 128, 0.14);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
165
188
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}
|
|
189
|
+
&__tab-text {
|
|
190
|
+
font-weight: 600;
|
|
191
|
+
font-size: 14px;
|
|
192
|
+
overflow: hidden;
|
|
193
|
+
text-overflow: ellipsis;
|
|
194
|
+
}
|
|
173
195
|
|
|
174
|
-
//
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
width: 72px;
|
|
181
|
-
height: 72px;
|
|
182
|
-
border-radius: 50%;
|
|
183
|
-
border: 2px solid #dff7f4;
|
|
184
|
-
background: linear-gradient(180deg, #65d8d1 0%, #21b5ae 100%);
|
|
185
|
-
color: #fff;
|
|
186
|
-
display: flex;
|
|
187
|
-
flex-direction: column;
|
|
188
|
-
align-items: center;
|
|
189
|
-
justify-content: center;
|
|
190
|
-
gap: 1px;
|
|
191
|
-
box-shadow: 0 8px 20px rgba(8, 112, 106, 0.3);
|
|
192
|
-
transition: all 200ms ease;
|
|
193
|
-
|
|
194
|
-
&:active {
|
|
195
|
-
transform: translateX(-50%) scale(0.95);
|
|
196
|
+
// 中间区域 - 占位
|
|
197
|
+
&__center {
|
|
198
|
+
position: relative;
|
|
199
|
+
width: 72px;
|
|
200
|
+
height: 56px;
|
|
201
|
+
flex-shrink: 0;
|
|
196
202
|
}
|
|
197
203
|
|
|
198
|
-
|
|
204
|
+
// 中间凸起按钮
|
|
205
|
+
&__center-btn {
|
|
206
|
+
position: absolute;
|
|
207
|
+
left: 50%;
|
|
208
|
+
top: -22px;
|
|
209
|
+
transform: translateX(-50%);
|
|
210
|
+
width: 72px;
|
|
211
|
+
height: 72px;
|
|
212
|
+
border-radius: 50%;
|
|
213
|
+
border: 3px solid $--mint-2;
|
|
199
214
|
background: $--paper;
|
|
200
|
-
|
|
215
|
+
display: flex;
|
|
216
|
+
flex-direction: column;
|
|
217
|
+
align-items: center;
|
|
218
|
+
justify-content: center;
|
|
219
|
+
gap: 2px;
|
|
220
|
+
box-shadow: 0 8px 20px rgba(8, 112, 106, 0.25);
|
|
221
|
+
transition: all 200ms ease;
|
|
222
|
+
|
|
223
|
+
&:active {
|
|
224
|
+
transform: translateX(-50%) scale(0.95);
|
|
225
|
+
}
|
|
201
226
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
227
|
+
&--active {
|
|
228
|
+
border-color: $--mint-1;
|
|
229
|
+
box-shadow: 0 8px 24px rgba(8, 112, 106, 0.35);
|
|
205
230
|
}
|
|
206
231
|
}
|
|
207
|
-
}
|
|
208
232
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
233
|
+
&__center-brand {
|
|
234
|
+
font-size: 22px;
|
|
235
|
+
line-height: 1;
|
|
236
|
+
font-weight: 700;
|
|
237
|
+
color: $--mint-1;
|
|
238
|
+
letter-spacing: 1px;
|
|
239
|
+
}
|
|
215
240
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
241
|
+
&__center-text {
|
|
242
|
+
font-size: 12px;
|
|
243
|
+
letter-spacing: 0.5px;
|
|
244
|
+
color: $--mint-1;
|
|
245
|
+
font-weight: 500;
|
|
246
|
+
}
|
|
220
247
|
}
|
|
221
|
-
</style>
|
|
248
|
+
</style>
|