@10yun/cv-mobile-ui 0.5.62 → 0.5.63
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/package.json +1 -1
- package/plugins/uni-extend.js +10 -10
- package/ui-fireui/components/u-action-sheet/u-action-sheet.vue +46 -16
- package/ui-fireui/components/u-alert/u-alert.vue +11 -5
- package/ui-fireui/components/u-badge/u-badge.vue +52 -69
- package/ui-fireui/components/u-bottom-navigation/u-bottom-navigation.vue +28 -20
- package/ui-fireui/components/u-bottom-popup/u-bottom-popup.vue +40 -11
- package/ui-fireui/components/u-bubble-popup/u-bubble-popup.vue +3 -6
- package/ui-fireui/components/u-button/u-button.vue +262 -259
- package/ui-fireui/components/u-calendar/u-calendar.vue +227 -44
- package/ui-fireui/components/u-calendar/u-calendar2.js +562 -0
- package/ui-fireui/components/u-card/u-card.vue +50 -32
- package/ui-fireui/components/u-cascade-selection/u-cascade-selection.vue +197 -74
- package/ui-fireui/components/u-circular-progress/u-circular-progress.vue +324 -0
- package/ui-fireui/components/u-clipboard2/tui-clipboard.js +53 -0
- package/ui-fireui/components/u-collapse/u-collapse.vue +8 -8
- package/ui-fireui/components/u-config/index.js +129 -0
- package/ui-fireui/components/u-count-down/u-count-down.vue +124 -19
- package/ui-fireui/components/u-datetime/u-datetime.vue +416 -176
- package/ui-fireui/components/u-divider/u-divider.vue +3 -3
- package/ui-fireui/components/u-drawer/u-drawer.vue +55 -12
- package/ui-fireui/components/u-dropdown-list/u-dropdown-list.vue +103 -0
- package/ui-fireui/components/u-fab/u-fab.vue +344 -0
- package/ui-fireui/components/u-footer/u-footer.vue +148 -0
- package/ui-fireui/components/u-grid/u-grid.vue +2 -8
- package/ui-fireui/components/u-grid-item/u-grid-item.vue +22 -5
- package/ui-fireui/components/u-icon/u-icon-new.js +190 -0
- package/ui-fireui/components/u-icon/u-icon-new.vue +100 -0
- package/ui-fireui/components/u-image-cropper/u-image-cropper.vue +1144 -0
- package/ui-fireui/components/u-image-group/u-image-group.vue +164 -0
- package/ui-fireui/components/u-keyboard/u-keyboard.vue +3 -2
- package/ui-fireui/components/u-keyboard-input/u-keyboard-input.vue +1 -1
- package/ui-fireui/components/u-list-cell/u-list-cell.vue +82 -72
- package/ui-fireui/components/u-list-view/u-list-view.vue +33 -8
- package/ui-fireui/components/u-loading/u-loading.vue +107 -27
- package/ui-fireui/components/u-loadmore/u-loadmore.vue +21 -3
- package/ui-fireui/components/u-modal/u-modal.vue +140 -176
- package/ui-fireui/components/u-navigation-bar/u-navigation-bar.vue +121 -28
- package/ui-fireui/components/u-no-data/u-no-data.vue +58 -20
- package/ui-fireui/components/u-nomore/u-nomore.vue +5 -4
- package/ui-fireui/components/u-numberbox/u-numberbox.vue +88 -45
- package/ui-fireui/components/u-picture-cropper/u-picture-cropper.vue +94 -36
- package/ui-fireui/components/u-picture-cropper/u-picture-cropper.wxs +27 -17
- package/ui-fireui/components/u-rate/u-rate.vue +197 -0
- package/ui-fireui/components/u-round-progress/u-round-progress.vue +62 -42
- package/ui-fireui/components/u-scroll-top/u-scroll-top.vue +4 -3
- package/ui-fireui/components/u-section/u-section.vue +149 -0
- package/ui-fireui/components/u-skeleton/u-skeleton.vue +37 -6
- package/ui-fireui/components/u-steps/u-steps.vue +110 -27
- package/ui-fireui/components/u-sticky/u-sticky.vue +35 -21
- package/ui-fireui/components/u-sticky-wxs/u-sticky-wxs.vue +7 -4
- package/ui-fireui/components/u-sticky-wxs/u-sticky.wxs +39 -36
- package/ui-fireui/components/u-swipe-action/u-swipe-action.vue +76 -19
- package/ui-fireui/components/u-tabbar/u-tabbar.vue +71 -38
- package/ui-fireui/components/u-tabs/u-tabs.vue +133 -51
- package/ui-fireui/components/u-tag/u-tag.vue +109 -226
- package/ui-fireui/components/u-time-axis/u-time-axis.vue +1 -1
- package/ui-fireui/components/u-timeaxis-item/u-timeaxis-item.vue +1 -1
- package/ui-fireui/components/u-tips/u-tips.vue +35 -15
- package/ui-fireui/components/u-toast/u-toast.vue +9 -5
- package/ui-fireui/components/u-top-dropdown/u-top-dropdown.vue +8 -6
- package/ui-fireui/components/u-upload/u-upload-old.vue +462 -0
- package/ui-fireui/components/u-upload/u-upload.vue +648 -446
- package/ui-fireui/components/u-white-space/u-white-space.vue +68 -0
- package/ui-fireui/components/u-wing-blank/u-wing-blank.vue +100 -0
- package/uview-plus/libs/ctocode/index.js +1 -0
- package/uview-plus/libs/ctocode/richText.js +0 -1
package/package.json
CHANGED
package/plugins/uni-extend.js
CHANGED
|
@@ -63,16 +63,16 @@ export function extScanCode() {
|
|
|
63
63
|
// #ifndef H5
|
|
64
64
|
|
|
65
65
|
// #ifdef APP-PLUS
|
|
66
|
-
var icon = plus.nativeObj.View.getViewById('icon0');
|
|
67
|
-
if (icon) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
66
|
+
// var icon = plus.nativeObj.View.getViewById('icon0');
|
|
67
|
+
// if (icon) {
|
|
68
|
+
// setTimeout(function () {
|
|
69
|
+
// icon.hide();
|
|
70
|
+
// }, 5);
|
|
71
|
+
// uni.setTabBarItem({
|
|
72
|
+
// index: 0,
|
|
73
|
+
// selectedIconPath: '/static/a2.png'
|
|
74
|
+
// });
|
|
75
|
+
// }
|
|
76
76
|
// #endif
|
|
77
77
|
|
|
78
78
|
return new Promise((resolve, reject) => {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view @touchmove.stop.prevent>
|
|
3
|
-
<view
|
|
3
|
+
<view
|
|
4
|
+
class="up-actionsheet"
|
|
5
|
+
:class="{ 'up-actionsheet-show': show, 'up-actionsheet-radius': radius }"
|
|
6
|
+
:style="{ zIndex: getZIndex }"
|
|
7
|
+
>
|
|
4
8
|
<view class="up-actionsheet-tips" :style="{ fontSize: size + 'rpx', color: color }" v-if="tips">
|
|
5
9
|
{{ tips }}
|
|
6
10
|
</view>
|
|
@@ -12,10 +16,10 @@
|
|
|
12
16
|
hover-class="up-actionsheet-hover"
|
|
13
17
|
:hover-stay-time="150"
|
|
14
18
|
:data-index="index"
|
|
15
|
-
:style="{ color: item.color ||
|
|
19
|
+
:style="{ color: item.color || textColor }"
|
|
16
20
|
@tap="handleClickItem"
|
|
17
21
|
>
|
|
18
|
-
{{ item
|
|
22
|
+
{{ item[textField] }}
|
|
19
23
|
</view>
|
|
20
24
|
</block>
|
|
21
25
|
</view>
|
|
@@ -29,19 +33,20 @@
|
|
|
29
33
|
取消
|
|
30
34
|
</view>
|
|
31
35
|
</view>
|
|
32
|
-
<view
|
|
36
|
+
<view
|
|
37
|
+
class="up-actionsheet-mask"
|
|
38
|
+
:class="{ 'up-mask-show': show }"
|
|
39
|
+
:style="{ background: maskColor, zIndex: zIndex }"
|
|
40
|
+
@tap="handleClickMask"
|
|
41
|
+
></view>
|
|
33
42
|
</view>
|
|
34
43
|
</template>
|
|
35
44
|
|
|
36
45
|
<script>
|
|
37
46
|
export default {
|
|
38
|
-
name: '
|
|
47
|
+
name: 'tuiActionsheet',
|
|
48
|
+
emits: ['click', 'cancel'],
|
|
39
49
|
props: {
|
|
40
|
-
//点击遮罩 是否可关闭
|
|
41
|
-
maskClosable: {
|
|
42
|
-
type: Boolean,
|
|
43
|
-
default: true
|
|
44
|
-
},
|
|
45
50
|
//显示操作菜单
|
|
46
51
|
show: {
|
|
47
52
|
type: Boolean,
|
|
@@ -50,7 +55,7 @@ export default {
|
|
|
50
55
|
//菜单按钮数组,自定义文本颜色,红色参考色:#e53a37
|
|
51
56
|
itemList: {
|
|
52
57
|
type: Array,
|
|
53
|
-
default: ()
|
|
58
|
+
default: function () {
|
|
54
59
|
return [
|
|
55
60
|
{
|
|
56
61
|
text: '确定',
|
|
@@ -59,6 +64,24 @@ export default {
|
|
|
59
64
|
];
|
|
60
65
|
}
|
|
61
66
|
},
|
|
67
|
+
textField: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: 'text'
|
|
70
|
+
},
|
|
71
|
+
textColor: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: '#2B2B2B'
|
|
74
|
+
},
|
|
75
|
+
//点击遮罩 是否可关闭
|
|
76
|
+
maskClosable: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: true
|
|
79
|
+
},
|
|
80
|
+
//v2.1.0
|
|
81
|
+
maskColor: {
|
|
82
|
+
type: String,
|
|
83
|
+
default: 'rgba(0, 0, 0, 0.6)'
|
|
84
|
+
},
|
|
62
85
|
//提示文字
|
|
63
86
|
tips: {
|
|
64
87
|
type: String,
|
|
@@ -83,6 +106,15 @@ export default {
|
|
|
83
106
|
isCancel: {
|
|
84
107
|
type: Boolean,
|
|
85
108
|
default: true
|
|
109
|
+
},
|
|
110
|
+
zIndex: {
|
|
111
|
+
type: [Number, String],
|
|
112
|
+
default: 998
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
computed: {
|
|
116
|
+
getZIndex() {
|
|
117
|
+
return Number(this.zIndex) + 2;
|
|
86
118
|
}
|
|
87
119
|
},
|
|
88
120
|
methods: {
|
|
@@ -92,9 +124,10 @@ export default {
|
|
|
92
124
|
},
|
|
93
125
|
handleClickItem(e) {
|
|
94
126
|
if (!this.show) return;
|
|
95
|
-
const
|
|
127
|
+
const index = Number(e.currentTarget.dataset.index);
|
|
96
128
|
this.$emit('click', {
|
|
97
|
-
index:
|
|
129
|
+
index: index,
|
|
130
|
+
...this.itemList[index]
|
|
98
131
|
});
|
|
99
132
|
},
|
|
100
133
|
handleClickCancel() {
|
|
@@ -111,7 +144,6 @@ export default {
|
|
|
111
144
|
left: 0;
|
|
112
145
|
right: 0;
|
|
113
146
|
bottom: 0;
|
|
114
|
-
z-index: 9999;
|
|
115
147
|
visibility: hidden;
|
|
116
148
|
transform: translate3d(0, 100%, 0);
|
|
117
149
|
transform-origin: center;
|
|
@@ -188,8 +220,6 @@ export default {
|
|
|
188
220
|
left: 0;
|
|
189
221
|
right: 0;
|
|
190
222
|
bottom: 0;
|
|
191
|
-
background-color: rgba(0, 0, 0, 0.6);
|
|
192
|
-
z-index: 9996;
|
|
193
223
|
transition: all 0.3s ease-in-out;
|
|
194
224
|
opacity: 0;
|
|
195
225
|
visibility: hidden;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
</view>
|
|
7
7
|
<view
|
|
8
8
|
class="up-alert-btn"
|
|
9
|
-
:style="{ color:
|
|
9
|
+
:style="{ color: getColor }"
|
|
10
10
|
hover-class="up-alert-btn-hover"
|
|
11
11
|
:hover-stay-time="150"
|
|
12
12
|
@tap.stop="handleClick"
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
|
|
21
21
|
<script>
|
|
22
22
|
export default {
|
|
23
|
-
name: '
|
|
23
|
+
name: 'tuiAlert',
|
|
24
|
+
emits: ['click', 'cancel'],
|
|
24
25
|
props: {
|
|
25
26
|
//控制显示
|
|
26
27
|
show: {
|
|
@@ -40,7 +41,7 @@ export default {
|
|
|
40
41
|
//按钮字体颜色
|
|
41
42
|
btnColor: {
|
|
42
43
|
type: String,
|
|
43
|
-
default: '
|
|
44
|
+
default: ''
|
|
44
45
|
},
|
|
45
46
|
btnText: {
|
|
46
47
|
type: String,
|
|
@@ -52,6 +53,11 @@ export default {
|
|
|
52
53
|
default: false
|
|
53
54
|
}
|
|
54
55
|
},
|
|
56
|
+
computed: {
|
|
57
|
+
getColor() {
|
|
58
|
+
return this.btnColor || (uni && uni.$tui && uni.$tui.color.danger) || '#EB0909';
|
|
59
|
+
}
|
|
60
|
+
},
|
|
55
61
|
methods: {
|
|
56
62
|
handleClick(e) {
|
|
57
63
|
if (!this.show) return;
|
|
@@ -77,7 +83,7 @@ export default {
|
|
|
77
83
|
opacity: 0;
|
|
78
84
|
border-radius: 6rpx;
|
|
79
85
|
overflow: hidden;
|
|
80
|
-
z-index:
|
|
86
|
+
z-index: 1001;
|
|
81
87
|
}
|
|
82
88
|
|
|
83
89
|
.up-alert-show {
|
|
@@ -92,7 +98,7 @@ export default {
|
|
|
92
98
|
right: 0;
|
|
93
99
|
bottom: 0;
|
|
94
100
|
background-color: rgba(0, 0, 0, 0.5);
|
|
95
|
-
z-index:
|
|
101
|
+
z-index: 999;
|
|
96
102
|
transition: all 0.3s ease-in-out;
|
|
97
103
|
opacity: 0;
|
|
98
104
|
visibility: hidden;
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view
|
|
3
|
-
:class="[dot ? 'up-badge-dot' : 'up-badge',
|
|
4
|
-
:style="{
|
|
3
|
+
:class="[dot ? 'up-badge-dot' : 'up-badge', !dot ? 'up-badge-scale' : '']"
|
|
4
|
+
:style="{
|
|
5
|
+
top: top,
|
|
6
|
+
right: right,
|
|
7
|
+
position: absolute ? 'absolute' : 'static',
|
|
8
|
+
transform: getStyle,
|
|
9
|
+
margin: margin,
|
|
10
|
+
background: getBackground,
|
|
11
|
+
color: getColor
|
|
12
|
+
}"
|
|
5
13
|
@tap="handleClick"
|
|
6
14
|
>
|
|
7
15
|
<slot></slot>
|
|
@@ -10,7 +18,8 @@
|
|
|
10
18
|
|
|
11
19
|
<script>
|
|
12
20
|
export default {
|
|
13
|
-
name: '
|
|
21
|
+
name: 'tuiBadge',
|
|
22
|
+
emits: ['click'],
|
|
14
23
|
props: {
|
|
15
24
|
//primary,warning,green,danger,white,black,gray,white_red
|
|
16
25
|
type: {
|
|
@@ -53,6 +62,46 @@ export default {
|
|
|
53
62
|
computed: {
|
|
54
63
|
getStyle() {
|
|
55
64
|
return `scale(${this.scaleRatio}) translateX(${this.translateX})`;
|
|
65
|
+
},
|
|
66
|
+
getBackground() {
|
|
67
|
+
const global = uni && uni.$tui && uni.$tui.color;
|
|
68
|
+
let color = {
|
|
69
|
+
primary: (global && global.primary) || '#5677fc',
|
|
70
|
+
green: (global && global.success) || '#07c160',
|
|
71
|
+
warning: (global && global.warning) || '#ff7900',
|
|
72
|
+
danger: (global && global.danger) || '#EB0909',
|
|
73
|
+
white: '#fff',
|
|
74
|
+
black: '#000',
|
|
75
|
+
gray: '#ededed',
|
|
76
|
+
red: (global && global.pink) || '#f74d54',
|
|
77
|
+
pink: (global && global.pink) || '#f74d54',
|
|
78
|
+
white_red: '#fff',
|
|
79
|
+
white_primary: '#fff',
|
|
80
|
+
white_green: '#fff',
|
|
81
|
+
white_warning: '#fff',
|
|
82
|
+
white_pink: '#fff'
|
|
83
|
+
}[this.type];
|
|
84
|
+
return color;
|
|
85
|
+
},
|
|
86
|
+
getColor() {
|
|
87
|
+
const global = uni && uni.$tui && uni.$tui.color;
|
|
88
|
+
let color = {
|
|
89
|
+
primary: '#fff',
|
|
90
|
+
green: '#fff',
|
|
91
|
+
warning: '#fff',
|
|
92
|
+
danger: '#fff',
|
|
93
|
+
white: '#333',
|
|
94
|
+
black: '#fff',
|
|
95
|
+
gray: '#999',
|
|
96
|
+
red: '#fff',
|
|
97
|
+
pink: (global && global.pink) || '#f74d54',
|
|
98
|
+
white_red: (global && global.danger) || '#EB0909',
|
|
99
|
+
white_primary: (global && global.primary) || '#5677fc',
|
|
100
|
+
white_green: (global && global.success) || '#07c160',
|
|
101
|
+
white_warning: (global && global.warning) || '#ff7900',
|
|
102
|
+
white_pink: (global && global.pink) || '#f74d54'
|
|
103
|
+
}[this.type];
|
|
104
|
+
return color;
|
|
56
105
|
}
|
|
57
106
|
},
|
|
58
107
|
methods: {
|
|
@@ -64,71 +113,6 @@ export default {
|
|
|
64
113
|
</script>
|
|
65
114
|
|
|
66
115
|
<style scoped>
|
|
67
|
-
/* color start*/
|
|
68
|
-
|
|
69
|
-
.up-primary {
|
|
70
|
-
background-color: #5677fc;
|
|
71
|
-
color: #fff;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.up-danger {
|
|
75
|
-
background-color: #ed3f14;
|
|
76
|
-
color: #fff;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.up-red {
|
|
80
|
-
background-color: #f74d54;
|
|
81
|
-
color: #fff;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.up-warning {
|
|
85
|
-
background-color: #ff7900;
|
|
86
|
-
color: #fff;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.up-green {
|
|
90
|
-
background-color: #19be6b;
|
|
91
|
-
color: #fff;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.up-white {
|
|
95
|
-
background-color: #fff;
|
|
96
|
-
color: #333;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.up-white_red {
|
|
100
|
-
background-color: #fff;
|
|
101
|
-
color: #f74d54;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.up-white_primary {
|
|
105
|
-
background-color: #fff;
|
|
106
|
-
color: #5677fc;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.up-white_green {
|
|
110
|
-
background-color: #fff;
|
|
111
|
-
color: #19be6b;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.up-white_warning {
|
|
115
|
-
background-color: #fff;
|
|
116
|
-
color: #ff7900;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.up-black {
|
|
120
|
-
background-color: #000;
|
|
121
|
-
color: #fff;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.up-gray {
|
|
125
|
-
background-color: #ededed;
|
|
126
|
-
color: #999;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/* color end*/
|
|
130
|
-
|
|
131
|
-
/* badge start*/
|
|
132
116
|
|
|
133
117
|
.up-badge-dot {
|
|
134
118
|
height: 8px;
|
|
@@ -154,5 +138,4 @@ export default {
|
|
|
154
138
|
transform-origin: center center;
|
|
155
139
|
}
|
|
156
140
|
|
|
157
|
-
/* badge end*/
|
|
158
141
|
</style>
|
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view @touchmove.stop.prevent="stop">
|
|
3
|
-
<view
|
|
3
|
+
<view
|
|
4
|
+
class="up-bottom-navigation"
|
|
5
|
+
:style="{ backgroundColor: isDarkMode ? '#202020' : backgroundColor }"
|
|
6
|
+
:class="{ 'up-navigation-fixed': isFixed, 'up-remove-splitLine': unlined }"
|
|
7
|
+
>
|
|
4
8
|
<view
|
|
5
9
|
class="up-navigation-item"
|
|
6
10
|
:class="{ 'up-item-after_height': splitLineScale, 'up-last-item': index == itemList.length - 1 }"
|
|
7
|
-
:style="{ backgroundColor: isDarkMode ? '#202020' : backgroundColor }"
|
|
8
11
|
v-for="(item, index) in itemList"
|
|
9
12
|
:key="index"
|
|
10
13
|
>
|
|
11
14
|
<view class="up-item-inner" @tap="menuClick(index, item.parameter, item.type)">
|
|
12
15
|
<image
|
|
13
|
-
:src="current
|
|
16
|
+
:src="getIcon(current, index, item)"
|
|
14
17
|
class="up-navigation-img"
|
|
15
18
|
v-if="item.iconPath || (current == index && item.selectedIconPath && item.type == 1)"
|
|
16
19
|
></image>
|
|
17
20
|
<text
|
|
18
21
|
class="up-navigation-text"
|
|
19
22
|
:style="{
|
|
20
|
-
color: isDarkMode ? '#fff' : current == index && item.type == 1 ?
|
|
23
|
+
color: isDarkMode ? '#fff' : current == index && item.type == 1 ? getSelectColor : item.color || color,
|
|
21
24
|
fontWeight: current == index && bold && item.type == 1 ? 'bold' : 'normal',
|
|
22
25
|
fontSize: fontSize
|
|
23
26
|
}"
|
|
@@ -38,7 +41,7 @@
|
|
|
38
41
|
:hover-stay-time="150"
|
|
39
42
|
v-for="(subItem, subIndex) in item.itemList || []"
|
|
40
43
|
:key="subIndex"
|
|
41
|
-
@tap="subMenuClick(index, item.type, subIndex, subItem.parameter)"
|
|
44
|
+
@tap="subMenuClick(index, item.type, subIndex, subItem.parameter || '')"
|
|
42
45
|
>
|
|
43
46
|
<text
|
|
44
47
|
class="up-ellipsis"
|
|
@@ -57,7 +60,8 @@
|
|
|
57
60
|
|
|
58
61
|
<script>
|
|
59
62
|
export default {
|
|
60
|
-
name: '
|
|
63
|
+
name: 'tuiBottomNavigation',
|
|
64
|
+
emits: ['click'],
|
|
61
65
|
props: {
|
|
62
66
|
//当前索引
|
|
63
67
|
current: {
|
|
@@ -90,7 +94,7 @@ export default {
|
|
|
90
94
|
}
|
|
91
95
|
]
|
|
92
96
|
}
|
|
93
|
-
*
|
|
97
|
+
*
|
|
94
98
|
* */
|
|
95
99
|
itemList: {
|
|
96
100
|
type: Array,
|
|
@@ -106,7 +110,7 @@ export default {
|
|
|
106
110
|
//选中颜色
|
|
107
111
|
selectedColor: {
|
|
108
112
|
type: String,
|
|
109
|
-
default: '
|
|
113
|
+
default: ''
|
|
110
114
|
},
|
|
111
115
|
fontSize: {
|
|
112
116
|
type: String,
|
|
@@ -163,13 +167,24 @@ export default {
|
|
|
163
167
|
default: false
|
|
164
168
|
}
|
|
165
169
|
},
|
|
166
|
-
|
|
167
170
|
data() {
|
|
168
171
|
return {
|
|
169
172
|
showMenuIndex: -1 //显示的菜单index
|
|
170
173
|
};
|
|
171
174
|
},
|
|
175
|
+
computed: {
|
|
176
|
+
getSelectColor() {
|
|
177
|
+
return this.selectedColor || (uni && uni.$tui && uni.$tui.color.primary) || '#5677fc';
|
|
178
|
+
}
|
|
179
|
+
},
|
|
172
180
|
methods: {
|
|
181
|
+
getIcon: function (current, index, item) {
|
|
182
|
+
let url = item.iconPath;
|
|
183
|
+
if (item.type == 1) {
|
|
184
|
+
url = current == index ? item.selectedIconPath || item.iconPath : item.iconPath;
|
|
185
|
+
}
|
|
186
|
+
return url;
|
|
187
|
+
},
|
|
173
188
|
stop() {
|
|
174
189
|
return false;
|
|
175
190
|
},
|
|
@@ -199,13 +214,6 @@ export default {
|
|
|
199
214
|
subIndex: subIndex,
|
|
200
215
|
parameter: parameter || ''
|
|
201
216
|
});
|
|
202
|
-
},
|
|
203
|
-
getIcon(current, index, item) {
|
|
204
|
-
let url = item.iconPath;
|
|
205
|
-
if (item.type == 1) {
|
|
206
|
-
url = current == index ? item.selectedIconPath || item.iconPath : item.iconPath;
|
|
207
|
-
}
|
|
208
|
-
return url;
|
|
209
217
|
}
|
|
210
218
|
}
|
|
211
219
|
};
|
|
@@ -226,19 +234,20 @@ export default {
|
|
|
226
234
|
position: fixed !important;
|
|
227
235
|
left: 0;
|
|
228
236
|
bottom: 0;
|
|
237
|
+
padding-bottom: constant(safe-area-inset-bottom);
|
|
229
238
|
padding-bottom: env(safe-area-inset-bottom);
|
|
239
|
+
box-sizing: content-box;
|
|
230
240
|
}
|
|
231
241
|
|
|
232
242
|
.up-bottom-navigation::after {
|
|
233
243
|
content: '';
|
|
234
244
|
width: 100%;
|
|
235
|
-
border-top:
|
|
245
|
+
border-top: 1px solid #bfbfbf;
|
|
236
246
|
position: absolute;
|
|
237
247
|
top: 0;
|
|
238
248
|
left: 0;
|
|
239
249
|
transform: scaleY(0.5) translateZ(0);
|
|
240
250
|
transform-origin: 0 0;
|
|
241
|
-
transform-origin: 0 100%;
|
|
242
251
|
z-index: 1000;
|
|
243
252
|
}
|
|
244
253
|
.up-remove-splitLine::before {
|
|
@@ -250,7 +259,6 @@ export default {
|
|
|
250
259
|
height: 100rpx;
|
|
251
260
|
position: relative;
|
|
252
261
|
box-sizing: border-box;
|
|
253
|
-
position: relative;
|
|
254
262
|
}
|
|
255
263
|
|
|
256
264
|
.up-item-inner {
|
|
@@ -266,7 +274,7 @@ export default {
|
|
|
266
274
|
height: 100%;
|
|
267
275
|
content: '';
|
|
268
276
|
position: absolute;
|
|
269
|
-
border-right:
|
|
277
|
+
border-right: 1px solid #bfbfbf;
|
|
270
278
|
transform: scaleX(0.5) translateZ(0);
|
|
271
279
|
right: 0;
|
|
272
280
|
top: 0;
|
|
@@ -2,19 +2,30 @@
|
|
|
2
2
|
<view @touchmove.stop.prevent>
|
|
3
3
|
<view
|
|
4
4
|
class="up-popup-class up-bottom-popup"
|
|
5
|
-
:class="{ 'up-popup-show': show, 'up-popup-radius': radius }"
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
:class="{ 'up-popup-show': show, 'up-popup-radius': radius, 'up-bp__safearea': isSafeArea }"
|
|
6
|
+
:style="{
|
|
7
|
+
background: backgroundColor,
|
|
8
|
+
height: height ? height + 'rpx' : 'auto',
|
|
9
|
+
zIndex: zIndex,
|
|
10
|
+
transform: `translate3d(0, ${show ? translateY : '100%'}, 0)`
|
|
11
|
+
}"
|
|
8
12
|
>
|
|
9
13
|
<slot></slot>
|
|
10
14
|
</view>
|
|
11
|
-
<view
|
|
15
|
+
<view
|
|
16
|
+
class="up-popup-mask"
|
|
17
|
+
:class="[show ? 'up-mask-show' : '']"
|
|
18
|
+
:style="{ zIndex: maskZIndex }"
|
|
19
|
+
v-if="mask"
|
|
20
|
+
@tap="handleClose"
|
|
21
|
+
></view>
|
|
12
22
|
</view>
|
|
13
23
|
</template>
|
|
14
24
|
|
|
15
25
|
<script>
|
|
16
26
|
export default {
|
|
17
|
-
name: '
|
|
27
|
+
name: 'tuiBottomPopup',
|
|
28
|
+
emits: ['close'],
|
|
18
29
|
props: {
|
|
19
30
|
//是否需要mask
|
|
20
31
|
mask: {
|
|
@@ -40,6 +51,24 @@ export default {
|
|
|
40
51
|
radius: {
|
|
41
52
|
type: Boolean,
|
|
42
53
|
default: true
|
|
54
|
+
},
|
|
55
|
+
zIndex: {
|
|
56
|
+
type: [Number, String],
|
|
57
|
+
default: 997
|
|
58
|
+
},
|
|
59
|
+
maskZIndex: {
|
|
60
|
+
type: [Number, String],
|
|
61
|
+
default: 996
|
|
62
|
+
},
|
|
63
|
+
//弹层显示时,垂直方向移动的距离
|
|
64
|
+
translateY: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: '0'
|
|
67
|
+
},
|
|
68
|
+
//是否需要判断底部安全区域(主要针对iphonex以上机型)
|
|
69
|
+
isSafeArea: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: true
|
|
43
72
|
}
|
|
44
73
|
},
|
|
45
74
|
methods: {
|
|
@@ -60,25 +89,26 @@ export default {
|
|
|
60
89
|
left: 0;
|
|
61
90
|
right: 0;
|
|
62
91
|
bottom: 0;
|
|
63
|
-
z-index: 997;
|
|
64
|
-
/* visibility: hidden; */
|
|
65
92
|
opacity: 0;
|
|
66
93
|
transform: translate3d(0, 100%, 0);
|
|
67
94
|
transform-origin: center;
|
|
68
95
|
transition: all 0.3s ease-in-out;
|
|
69
96
|
min-height: 20rpx;
|
|
70
97
|
}
|
|
98
|
+
|
|
99
|
+
.up-bp__safearea {
|
|
100
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
101
|
+
}
|
|
102
|
+
|
|
71
103
|
.up-popup-radius {
|
|
72
104
|
border-top-left-radius: 24rpx;
|
|
73
105
|
border-top-right-radius: 24rpx;
|
|
74
|
-
padding-bottom: env(safe-area-inset-bottom);
|
|
75
106
|
overflow: hidden;
|
|
76
107
|
}
|
|
77
108
|
|
|
78
109
|
.up-popup-show {
|
|
79
|
-
transform: translate3d(0, 0, 0);
|
|
80
110
|
opacity: 1;
|
|
81
|
-
/*
|
|
111
|
+
/* transform: translate3d(0, 0, 0); */
|
|
82
112
|
}
|
|
83
113
|
|
|
84
114
|
.up-popup-mask {
|
|
@@ -88,7 +118,6 @@ export default {
|
|
|
88
118
|
right: 0;
|
|
89
119
|
bottom: 0;
|
|
90
120
|
background-color: rgba(0, 0, 0, 0.6);
|
|
91
|
-
z-index: 996;
|
|
92
121
|
transition: all 0.3s ease-in-out;
|
|
93
122
|
opacity: 0;
|
|
94
123
|
visibility: hidden;
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
}"
|
|
65
65
|
v-if="direction == 'right'"
|
|
66
66
|
></view>
|
|
67
|
-
<slot
|
|
67
|
+
<slot></slot>
|
|
68
68
|
</view>
|
|
69
69
|
<view
|
|
70
70
|
@touchmove.stop.prevent="stop"
|
|
@@ -78,7 +78,8 @@
|
|
|
78
78
|
</template>
|
|
79
79
|
<script>
|
|
80
80
|
export default {
|
|
81
|
-
name: '
|
|
81
|
+
name: 'tuiBubblePopup',
|
|
82
|
+
emits: ['close'],
|
|
82
83
|
props: {
|
|
83
84
|
//宽度
|
|
84
85
|
width: {
|
|
@@ -118,7 +119,6 @@ export default {
|
|
|
118
119
|
//背景颜色
|
|
119
120
|
backgroundColor: {
|
|
120
121
|
type: String,
|
|
121
|
-
// 5c8dff
|
|
122
122
|
default: '#4c4c4c'
|
|
123
123
|
},
|
|
124
124
|
//字体颜色
|
|
@@ -212,9 +212,6 @@ export default {
|
|
|
212
212
|
height: 0;
|
|
213
213
|
border-style: solid;
|
|
214
214
|
z-index: 997;
|
|
215
|
-
border: 16rpx solid;
|
|
216
|
-
|
|
217
|
-
|
|
218
215
|
}
|
|
219
216
|
|
|
220
217
|
.up-popup-mask {
|