@10yun/cv-mobile-ui 0.5.60 → 0.5.62
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/storage.js +2 -2
- 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/uview-plus/changelog-v2.md +77 -6
- package/uview-plus/changelog-wu.md +41 -14
- package/uview-plus/changelog.md +375 -59
- package/{plugins/uni-richText.js → uview-plus/libs/ctocode/richText.js} +28 -31
- package/uview-plus/package-wu.json +5 -37
- package/uview-plus/package.json +13 -14
- package/libs/storage2.js +0 -165
- 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/{js-sdk → libs}/QS-SharePoster/QRCodeAlg.js +0 -0
- /package/{js-sdk → libs}/QS-SharePoster/QS-SharePoster.js +0 -0
- /package/{js-sdk → libs}/QS-SharePoster/QS-SharePoster2.js +0 -0
- /package/{js-sdk → libs}/QS-SharePoster/app.js +0 -0
- /package/{js-sdk → libs}/QS-SharePoster/app2.js +0 -0
- /package/{js-sdk → libs}/QS-SharePoster/image-tools.js +0 -0
- /package/{js-sdk → libs}/QS-SharePoster/package.json +0 -0
- /package/{js-sdk → libs}/Sansnn-uQRCode/uqrcode.js +0 -0
- /package/{js-sdk → libs}/clipboard.min.js +0 -0
- /package/{js-sdk → libs}/gprint/encoding-indexes.js +0 -0
- /package/{js-sdk → libs}/gprint/encoding.js +0 -0
- /package/{js-sdk → libs}/gprint/esc.js +0 -0
- /package/{js-sdk → libs}/gprint/tsc.js +0 -0
- /package/{js-sdk → libs}/ican-H5Api/ican-H5Api.js +0 -0
- /package/libs/{amap-wx.130.js → maps/amap-wx.130.js} +0 -0
- /package/libs/{amap-wx.js → maps/amap-wx.js} +0 -0
- /package/libs/{amqp-wx.js → maps/amqp-wx.js} +0 -0
- /package/libs/{qqmap-wx-jssdk.js → maps/qqmap-wx-jssdk.js} +0 -0
- /package/libs/{qqmap.js → maps/qqmap.js} +0 -0
package/package.json
CHANGED
package/plugins/storage.js
CHANGED
|
@@ -11,7 +11,7 @@ class StorageClass {
|
|
|
11
11
|
constructor(options = {}) {
|
|
12
12
|
this.config = Object.assign(
|
|
13
13
|
{
|
|
14
|
-
cache_keys: '
|
|
14
|
+
cache_keys: '___keys',
|
|
15
15
|
expiration: 7 * 86400, // 60 * 60 * 24 * 7,// 默认7天
|
|
16
16
|
prefix: '',
|
|
17
17
|
suffix: ''
|
|
@@ -19,7 +19,7 @@ class StorageClass {
|
|
|
19
19
|
options
|
|
20
20
|
);
|
|
21
21
|
|
|
22
|
-
this.KEYS_CACHE_FLAG = this.__getFullKeyName(this.config.cache_keys)
|
|
22
|
+
this.KEYS_CACHE_FLAG = this.__getFullKeyName(this.config.cache_keys);
|
|
23
23
|
|
|
24
24
|
// 内存缓存层
|
|
25
25
|
this.cacheMap = new Map();
|
|
@@ -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>
|