@10yun/cv-mobile-ui 0.5.61 → 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 +109 -0
- package/ui-cv/components/cv-dialog-bottom/cv-dialog-bottom.vue +71 -47
- package/ui-cv/components/cv-dialog-full/cv-dialog-full.vue +20 -17
- package/ui-cv/components/cv-upload-avatar/cv-upload-avatar.vue +0 -1
- package/ui-cv/components/cv-upload-image/cv-upload-image.vue +0 -1
- 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/changelog-v2.md +77 -6
- package/uview-plus/changelog-wu.md +41 -14
- package/uview-plus/changelog.md +375 -59
- package/uview-plus/libs/ctocode/index.js +1 -0
- package/{plugins/uni-richText.js → uview-plus/libs/ctocode/richText.js} +28 -32
- package/uview-plus/package-wu.json +5 -37
- package/uview-plus/package.json +13 -14
- package/plugins/tui-validation.js +0 -279
- package/plugins/uni-scanCode.js +0 -76
- package/plugins/uni-socket.js +0 -174
- package/plugins/uniMap.js +0 -48
- package/plugins/utils.js +0 -13
- package/uview-plus/changelog-wu-tool.md +0 -21
- package/uview-plus/package-wu-tool.json +0 -84
package/package.json
CHANGED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* uni-app 自带地图
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* 选择地图
|
|
6
|
+
* @param {Object} keyword 搜索关键字
|
|
7
|
+
* @return {Object}
|
|
8
|
+
*
|
|
9
|
+
* 位置名称:res.name
|
|
10
|
+
* 详细地址: res.address
|
|
11
|
+
* 纬度: res.latitude
|
|
12
|
+
* 经度:res.longitude
|
|
13
|
+
*/
|
|
14
|
+
export function extChooseLocation(keyword) {
|
|
15
|
+
return new Promise((resolve, reject) => {
|
|
16
|
+
uni.chooseLocation({
|
|
17
|
+
keyword: keyword,
|
|
18
|
+
success(res) {
|
|
19
|
+
resolve(res);
|
|
20
|
+
},
|
|
21
|
+
fail(err) {
|
|
22
|
+
reject(err);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* 打开地图
|
|
29
|
+
* @param {Object} lat 经度
|
|
30
|
+
* @param {Object} lng 纬度
|
|
31
|
+
*/
|
|
32
|
+
export function extOpenLocation(lat, lng) {
|
|
33
|
+
return new Promise((resolve, reject) => {
|
|
34
|
+
uni.openLocation({
|
|
35
|
+
latitude: lat,
|
|
36
|
+
longitude: lng,
|
|
37
|
+
success: function () {
|
|
38
|
+
resolve();
|
|
39
|
+
},
|
|
40
|
+
fail(err) {
|
|
41
|
+
reject(err);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
export function extEleOffset(selector) {
|
|
47
|
+
// 获取高度
|
|
48
|
+
return new Promise((resolve) =>
|
|
49
|
+
uni
|
|
50
|
+
.createSelectorQuery()
|
|
51
|
+
.in(this)
|
|
52
|
+
.select(selector)
|
|
53
|
+
.boundingClientRect((data) => resolve(data))
|
|
54
|
+
.exec()
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
export function extScanCode() {
|
|
58
|
+
// #ifdef H5
|
|
59
|
+
uni.showToast({
|
|
60
|
+
title: 'h5不支持扫码'
|
|
61
|
+
});
|
|
62
|
+
// #endif
|
|
63
|
+
// #ifndef H5
|
|
64
|
+
|
|
65
|
+
// #ifdef APP-PLUS
|
|
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
|
+
// #endif
|
|
77
|
+
|
|
78
|
+
return new Promise((resolve, reject) => {
|
|
79
|
+
uni.scanCode({
|
|
80
|
+
scanType: ['qrCode'],
|
|
81
|
+
success: function (res) {
|
|
82
|
+
// uni.showModal({
|
|
83
|
+
// title: '提示',
|
|
84
|
+
// showCancel: false,
|
|
85
|
+
// content:'条码内容:' + res.result
|
|
86
|
+
// });
|
|
87
|
+
console.log('条码类型:' + res.scanType);
|
|
88
|
+
console.log('条码内容:' + res.result);
|
|
89
|
+
let codeRes = res.result;
|
|
90
|
+
codeRes = codeRes.toString();
|
|
91
|
+
return resolve({
|
|
92
|
+
scanType: res.scanType,
|
|
93
|
+
result: codeRes
|
|
94
|
+
});
|
|
95
|
+
},
|
|
96
|
+
complete: function (res) {
|
|
97
|
+
console.log('scancomplete');
|
|
98
|
+
},
|
|
99
|
+
fail: (res) => {
|
|
100
|
+
reject(res.result);
|
|
101
|
+
console.log('failfailfailfailfailfailfailfailfailfailfail');
|
|
102
|
+
uni.showToast({
|
|
103
|
+
title: res.result
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
// #endif
|
|
109
|
+
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="cv-dialog-bottom__wrap" :class="
|
|
2
|
+
<view class="cv-dialog-bottom__wrap" :class="isLastShow ? 'show' : ''">
|
|
3
|
+
<view class="cv-dialog-bottom__mask" @click.stop="maskClick"></view>
|
|
3
4
|
<view class="cv-dialog-bottom__box">
|
|
4
5
|
<view class="cv-dialog-bottom__bar">
|
|
5
|
-
<view class="
|
|
6
|
-
<view class="
|
|
6
|
+
<view class="cv-dialog-bottom__bar-left" v-if="showLeft" @tap="cancel">取消</view>
|
|
7
|
+
<view class="cv-dialog-bottom__bar-title">
|
|
8
|
+
<slot name="title">{{ title }}</slot>
|
|
9
|
+
</view>
|
|
10
|
+
<view class="cv-dialog-bottom__bar-right" v-if="showRight" @tap="confirm">确定</view>
|
|
7
11
|
</view>
|
|
8
12
|
<view class="cv-dialog-bottom__body" :style="bodyClass">
|
|
9
13
|
<slot name="default" />
|
|
@@ -17,7 +21,7 @@ import mixin from '../../libs/mixin/mixin.js';
|
|
|
17
21
|
export default {
|
|
18
22
|
mixins: [mpMixin, mixin],
|
|
19
23
|
name: 'cvDialogBottom',
|
|
20
|
-
emits: ['confirm'],
|
|
24
|
+
emits: ['cancel', 'confirm'],
|
|
21
25
|
props: {
|
|
22
26
|
show: {
|
|
23
27
|
type: Boolean,
|
|
@@ -26,28 +30,63 @@ export default {
|
|
|
26
30
|
bodyClass: {
|
|
27
31
|
type: [String],
|
|
28
32
|
default: ''
|
|
33
|
+
},
|
|
34
|
+
isMaskClick: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: true
|
|
37
|
+
},
|
|
38
|
+
showLeft: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: true
|
|
41
|
+
},
|
|
42
|
+
showRight: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: true
|
|
45
|
+
},
|
|
46
|
+
title: {
|
|
47
|
+
type: [String],
|
|
48
|
+
default: ''
|
|
29
49
|
}
|
|
30
50
|
},
|
|
31
51
|
watch: {},
|
|
52
|
+
computed: {
|
|
53
|
+
isLastShow() {
|
|
54
|
+
return this.localShow || this.show;
|
|
55
|
+
}
|
|
56
|
+
},
|
|
32
57
|
data() {
|
|
33
|
-
return {
|
|
58
|
+
return {
|
|
59
|
+
localShow: false
|
|
60
|
+
};
|
|
34
61
|
},
|
|
35
62
|
created() {},
|
|
36
63
|
methods: {
|
|
64
|
+
open() {
|
|
65
|
+
this.localShow = true;
|
|
66
|
+
},
|
|
67
|
+
close() {
|
|
68
|
+
this.localShow = false;
|
|
69
|
+
},
|
|
37
70
|
confirm() {
|
|
38
|
-
this.
|
|
71
|
+
this.close();
|
|
72
|
+
this.$emit('confirm');
|
|
39
73
|
},
|
|
40
74
|
cancel() {
|
|
41
|
-
this.
|
|
75
|
+
this.close();
|
|
76
|
+
this.$emit('cancel');
|
|
42
77
|
},
|
|
43
|
-
|
|
44
|
-
|
|
78
|
+
|
|
79
|
+
maskClick() {
|
|
80
|
+
if (this.isMaskClick) {
|
|
81
|
+
this.close();
|
|
82
|
+
}
|
|
45
83
|
}
|
|
46
84
|
}
|
|
47
85
|
};
|
|
48
86
|
</script>
|
|
49
87
|
<style>
|
|
50
88
|
.cv-dialog-bottom__wrap {
|
|
89
|
+
background: rgba(0, 0, 0, 0.6);
|
|
51
90
|
position: fixed;
|
|
52
91
|
top: 0;
|
|
53
92
|
right: 0;
|
|
@@ -55,36 +94,33 @@ export default {
|
|
|
55
94
|
left: 0;
|
|
56
95
|
z-index: 999;
|
|
57
96
|
opacity: 0;
|
|
97
|
+
width: 100%;
|
|
58
98
|
outline: 0;
|
|
59
|
-
text-align: center;
|
|
60
|
-
transform: scale(1.185);
|
|
61
99
|
backface-visibility: hidden;
|
|
62
100
|
-webkit-perspective: 1104px;
|
|
63
101
|
perspective: 1104px;
|
|
64
|
-
background: rgba(0, 0, 0, 0.6);
|
|
65
|
-
transition: all 0.3s ease-in-out 0s;
|
|
66
102
|
pointer-events: none;
|
|
103
|
+
text-align: center;
|
|
104
|
+
transform: scale(1.185);
|
|
105
|
+
transition: all 0.3s ease-in-out 0s;
|
|
67
106
|
margin-bottom: -552px;
|
|
107
|
+
display: flex;
|
|
108
|
+
flex-direction: column;
|
|
68
109
|
}
|
|
69
|
-
.cv-dialog-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
.cv-dialog-bottom__wrap::before {
|
|
73
|
-
content: '\200B';
|
|
74
|
-
display: inline-block;
|
|
75
|
-
height: 100%;
|
|
110
|
+
.cv-dialog-bottom__mask {
|
|
111
|
+
flex: 1;
|
|
112
|
+
min-height: 60px;
|
|
76
113
|
}
|
|
77
114
|
.cv-dialog-bottom__wrap.show {
|
|
78
115
|
opacity: 1;
|
|
79
|
-
transition-duration: 0.3s;
|
|
80
|
-
transform: scale(1);
|
|
81
116
|
overflow-x: hidden;
|
|
82
117
|
overflow-y: auto;
|
|
83
118
|
pointer-events: auto;
|
|
119
|
+
transition-duration: 0.3s;
|
|
120
|
+
transform: scale(1);
|
|
84
121
|
margin-bottom: 0;
|
|
85
122
|
}
|
|
86
123
|
.cv-dialog-bottom__box {
|
|
87
|
-
position: relative;
|
|
88
124
|
display: inline-block;
|
|
89
125
|
vertical-align: middle;
|
|
90
126
|
margin-left: auto;
|
|
@@ -100,7 +136,6 @@ export default {
|
|
|
100
136
|
}
|
|
101
137
|
.cv-dialog-bottom__bar {
|
|
102
138
|
display: flex;
|
|
103
|
-
position: relative;
|
|
104
139
|
-webkit-box-align: center;
|
|
105
140
|
-webkit-align-items: center;
|
|
106
141
|
align-items: center;
|
|
@@ -110,44 +145,33 @@ export default {
|
|
|
110
145
|
justify-content: space-between;
|
|
111
146
|
background-color: #ffffff;
|
|
112
147
|
color: #666666;
|
|
148
|
+
padding: 0 10px;
|
|
149
|
+
font-size: 15px;
|
|
150
|
+
}
|
|
151
|
+
.cv-dialog-bottom__bar-title {
|
|
152
|
+
flex: 1;
|
|
153
|
+
display: flex;
|
|
154
|
+
justify-content: center;
|
|
155
|
+
font-size: 15px;
|
|
156
|
+
font-weight: 400;
|
|
113
157
|
}
|
|
114
158
|
.cv-dialog-bottom__bar-left {
|
|
115
|
-
min-width: 55px;
|
|
116
|
-
min-height: 45px;
|
|
117
|
-
margin-right: 0;
|
|
118
|
-
margin-left: 16px;
|
|
119
159
|
display: flex;
|
|
120
|
-
-webkit-box-align: center;
|
|
121
|
-
-webkit-align-items: center;
|
|
122
160
|
align-items: center;
|
|
123
|
-
height: 100%;
|
|
124
|
-
-webkit-box-pack: center;
|
|
125
|
-
-webkit-justify-content: center;
|
|
126
161
|
justify-content: center;
|
|
127
|
-
|
|
162
|
+
min-width: 55px;
|
|
128
163
|
color: #0081ff;
|
|
129
164
|
}
|
|
130
165
|
.cv-dialog-bottom__bar-right {
|
|
131
|
-
min-width: 55px;
|
|
132
|
-
min-height: 45px;
|
|
133
|
-
margin-right: 16px;
|
|
134
|
-
font-size: 16px;
|
|
135
166
|
display: flex;
|
|
136
|
-
-webkit-box-align: center;
|
|
137
|
-
-webkit-align-items: center;
|
|
138
167
|
align-items: center;
|
|
139
|
-
height: 100%;
|
|
140
|
-
-webkit-box-pack: center;
|
|
141
|
-
-webkit-justify-content: center;
|
|
142
168
|
justify-content: center;
|
|
143
|
-
|
|
169
|
+
min-width: 55px;
|
|
144
170
|
color: #39b54a;
|
|
145
171
|
}
|
|
146
172
|
.cv-dialog-bottom__body {
|
|
147
|
-
padding
|
|
148
|
-
max-height: 500px;
|
|
173
|
+
padding: 10px;
|
|
149
174
|
overflow: auto;
|
|
150
|
-
text-align: left;
|
|
151
175
|
background-color: #fff;
|
|
152
176
|
}
|
|
153
177
|
</style>
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="cv-dialog-full__wrap" :class="
|
|
2
|
+
<view class="cv-dialog-full__wrap" :class="isLastShow ? 'show' : ''">
|
|
3
3
|
<view class="cv-dialog-full__box">
|
|
4
4
|
<view class="cv-dialog-full__bar">
|
|
5
5
|
<view class="cv-dialog-full__bar-left" v-if="showLeft" @tap="cancel">取消</view>
|
|
6
|
-
<view class="cv-dialog-full__bar-title"
|
|
6
|
+
<view class="cv-dialog-full__bar-title">
|
|
7
|
+
<slot name="title">{{ title }}</slot>
|
|
8
|
+
</view>
|
|
7
9
|
<view class="cv-dialog-full__bar-right" v-if="showRight" @tap="confirm">确定</view>
|
|
8
10
|
</view>
|
|
9
11
|
<view class="cv-dialog-full__body" :style="bodyClass">
|
|
@@ -42,6 +44,11 @@ export default {
|
|
|
42
44
|
}
|
|
43
45
|
},
|
|
44
46
|
watch: {},
|
|
47
|
+
computed: {
|
|
48
|
+
isLastShow() {
|
|
49
|
+
return this.localShow || this.show;
|
|
50
|
+
}
|
|
51
|
+
},
|
|
45
52
|
data() {
|
|
46
53
|
return {
|
|
47
54
|
localShow: false
|
|
@@ -56,13 +63,12 @@ export default {
|
|
|
56
63
|
this.localShow = false;
|
|
57
64
|
},
|
|
58
65
|
confirm() {
|
|
59
|
-
this.
|
|
66
|
+
this.close();
|
|
67
|
+
this.$emit('confirm');
|
|
60
68
|
},
|
|
61
69
|
cancel() {
|
|
62
|
-
this.
|
|
63
|
-
|
|
64
|
-
onConfirm(e) {
|
|
65
|
-
this.$emit('confirm', e);
|
|
70
|
+
this.close();
|
|
71
|
+
this.$emit('cancel');
|
|
66
72
|
}
|
|
67
73
|
}
|
|
68
74
|
};
|
|
@@ -81,16 +87,17 @@ export default {
|
|
|
81
87
|
-webkit-perspective: 1104px;
|
|
82
88
|
perspective: 1104px;
|
|
83
89
|
background: rgba(0, 0, 0, 0.6);
|
|
84
|
-
|
|
90
|
+
|
|
85
91
|
pointer-events: none;
|
|
92
|
+
transition: all 0.2s ease-in-out 0s;
|
|
86
93
|
}
|
|
87
94
|
.cv-dialog-full__wrap.show {
|
|
88
|
-
left: 0;
|
|
89
95
|
opacity: 1;
|
|
90
|
-
transition-duration: 0.2s;
|
|
91
96
|
overflow-x: hidden;
|
|
92
97
|
overflow-y: auto;
|
|
93
98
|
pointer-events: auto;
|
|
99
|
+
left: 0;
|
|
100
|
+
transition-duration: 0.2s;
|
|
94
101
|
}
|
|
95
102
|
.cv-dialog-full__wrap::before {
|
|
96
103
|
content: '\200B';
|
|
@@ -99,16 +106,12 @@ export default {
|
|
|
99
106
|
vertical-align: middle;
|
|
100
107
|
vertical-align: bottom;
|
|
101
108
|
}
|
|
102
|
-
.cv-dialog-full__wrap .cv-dialog {
|
|
103
|
-
width: 100%;
|
|
104
|
-
border-radius: 0;
|
|
105
|
-
height: 100%;
|
|
106
|
-
}
|
|
107
109
|
.cv-dialog-full__box {
|
|
108
110
|
display: inline-block;
|
|
109
111
|
vertical-align: middle;
|
|
110
|
-
|
|
112
|
+
|
|
111
113
|
max-width: 100%;
|
|
114
|
+
width: 100%;
|
|
112
115
|
background-color: #f8f8f8;
|
|
113
116
|
overflow: hidden;
|
|
114
117
|
height: 100%;
|
|
@@ -149,8 +152,8 @@ export default {
|
|
|
149
152
|
}
|
|
150
153
|
.cv-dialog-full__body {
|
|
151
154
|
padding: 10px;
|
|
152
|
-
height: calc(100% - 45px);
|
|
153
155
|
overflow: auto;
|
|
154
156
|
background-color: #fff;
|
|
157
|
+
height: calc(100% - 45px);
|
|
155
158
|
}
|
|
156
159
|
</style>
|
|
@@ -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;
|