@10yun/cv-mobile-ui 0.3.24 → 0.3.26
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 +5 -2
- package/plugins/request.js +14 -2
- package/ui-cv/cv-banner/cv-banner.vue +23 -14
- package/ui-cv/cv-banner-card/cv-banner-card.vue +24 -16
- package/ui-cv/cv-block/cv-block.vue +6 -6
- package/ui-cv/cv-box/cv-box.vue +6 -7
- package/ui-cv/cv-button/cv-button.vue +32 -13
- package/ui-cv/cv-cell/cv-cell.vue +21 -25
- package/ui-cv/cv-checkbox/cv-checkbox.vue +22 -22
- package/ui-cv/cv-checkbox-tag/cv-checkbox-tag.vue +30 -25
- package/ui-cv/cv-code-sms/cv-code-sms.vue +60 -38
- package/ui-cv/cv-dialog-bottom/cv-dialog-bottom.vue +14 -18
- package/ui-cv/cv-dialog-full/cv-dialog-full.vue +14 -18
- package/ui-cv/cv-dialog-loading/cv-dialog-loading.vue +10 -17
- package/ui-cv/cv-dialog-share/cv-dialog-share.vue +4 -5
- package/ui-cv/cv-draw-barcode/cv-draw-barcode.vue +54 -51
- package/ui-cv/cv-draw-posters/cv-draw-posters.vue +53 -71
- package/ui-cv/cv-draw-progress/cv-draw-progress.vue +44 -39
- package/ui-cv/cv-draw-qrcode/cv-draw-qrcode.vue +48 -45
- package/ui-cv/cv-editor/compressImage.vue +47 -40
- package/ui-cv/cv-editor/cv-editor.vue +234 -124
- package/ui-cv/cv-editor-parse/cv-editor-parse.vue +21 -30
- package/ui-cv/cv-editor-parse/u-parse.vue +21 -30
- package/ui-cv/cv-filter-hm/cv-filter-hm.vue +140 -74
- package/ui-cv/cv-form-group/cv-form-group.vue +11 -13
- package/ui-cv/cv-form-item/cv-form-item.vue +35 -20
- package/ui-cv/cv-form-merge/cv-form-merge.vue +5 -10
- package/ui-cv/cv-geo-local/cv-geo-local.vue +50 -27
- package/ui-cv/cv-icons/cv-icons.vue +24 -19
- package/ui-cv/cv-info/cv-info.vue +9 -11
- package/ui-cv/cv-input-btn/cv-input-btn.vue +34 -13
- package/ui-cv/cv-input-digit/cv-input-digit.vue +31 -18
- package/ui-cv/cv-input-idcard/cv-input-idcard.vue +31 -21
- package/ui-cv/cv-input-number/cv-input-number.vue +29 -14
- package/ui-cv/cv-input-password/cv-input-password.vue +31 -20
- package/ui-cv/cv-input-text/cv-input-text.vue +32 -17
- package/ui-cv/cv-link/cv-link.vue +7 -7
- package/ui-cv/cv-lists-base/cv-lists-base.vue +148 -114
- package/ui-cv/cv-lists-swiper/cv-lists-swipe2r.vue +24 -15
- package/ui-cv/cv-lists-swiper/cv-lists-swiper.vue +85 -63
- package/ui-cv/cv-load-more/cv-load-more.vue +60 -28
- package/ui-cv/cv-message/cv-message.vue +5 -6
- package/ui-cv/cv-nav-col/cv-nav-col.vue +9 -13
- package/ui-cv/cv-nav-group/cv-nav-group.vue +6 -8
- package/ui-cv/cv-nav-row/cv-nav-row.vue +21 -25
- package/ui-cv/cv-picker-date/cv-picker-date.vue +28 -12
- package/ui-cv/cv-picker-datetime/cv-picker-datetime.vue +43 -21
- package/ui-cv/cv-picker-datetime5/cv-picker-datetime5.vue +108 -60
- package/ui-cv/cv-picker-region/cv-picker-region.vue +46 -32
- package/ui-cv/cv-picker-time/cv-picker-time.vue +26 -11
- package/ui-cv/cv-picker1/cv-picker1.vue +32 -17
- package/ui-cv/cv-picker2/cv-picker2.vue +46 -28
- package/ui-cv/cv-picker3/cv-picker3.vue +77 -44
- package/ui-cv/cv-radio/cv-radio.vue +17 -10
- package/ui-cv/cv-radio-sex/cv-radio-sex.vue +20 -21
- package/ui-cv/cv-radio-tag/cv-radio-tag.vue +22 -11
- package/ui-cv/cv-rate/cv-rate.vue +17 -13
- package/ui-cv/cv-search/cv-search.vue +17 -12
- package/ui-cv/cv-skeleton/cv-skeleton.vue +32 -27
- package/ui-cv/cv-skeleton/cv-skeleton2.vue +56 -33
- package/ui-cv/cv-skeleton-group/cv-skeleton-group.vue +4 -6
- package/ui-cv/cv-specs/cv-specs.vue +31 -30
- package/ui-cv/cv-switch/cv-switch.vue +4 -5
- package/ui-cv/cv-tab-lists/cv-tab-lists.vue +189 -128
- package/ui-cv/cv-textarea/cv-textarea.vue +31 -13
- package/ui-cv/cv-treaty/cv-treaty.vue +8 -8
- package/ui-cv/cv-update-app/cv-update-app.vue +68 -53
- package/ui-cv/cv-upload-avatar/cv-upload-avatar.vue +33 -31
- package/ui-cv/cv-upload-img/cv-upload-img.vue +97 -70
- package/ui-cv/dict/area-city.js +612 -612
- package/ui-cv/dict/area-county.js +3392 -3392
- package/ui-cv/dict/area-province.js +35 -35
- package/ui-cv/mixins/mixins-checkbox.js +9 -15
- package/ui-cv/mixins/mixins-common.js +7 -7
- package/ui-cv/mixins/mixins-input.js +11 -12
- package/ui-cv/mixins/mixins-picker.js +9 -13
- package/ui-cv/mixins/mixins-radio.js +10 -14
package/package.json
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@10yun/cv-mobile-ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.26",
|
|
4
4
|
"description": "十云cvjs移动端ui,适用uniapp",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
|
+
"homepage": "https://cvjs.cn/cv-mobile-ui",
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"registry": "https://registry.npmjs.org/"
|
|
10
|
+
},
|
|
7
11
|
"repository": {
|
|
8
12
|
"type": "git",
|
|
9
13
|
"url": "https://gitee.com/cvjs/cv-mobile-ui"
|
|
10
14
|
},
|
|
11
|
-
"homepage": "https://cvjs.cn/cv-mobile-ui",
|
|
12
15
|
"dependencies": {},
|
|
13
16
|
"devDependencies": {},
|
|
14
17
|
"browserslist": [
|
package/plugins/request.js
CHANGED
|
@@ -29,6 +29,7 @@ class RequestClass {
|
|
|
29
29
|
this.jumpHandle = options.jumpHandle || null;
|
|
30
30
|
/* 新创建 axios 实例配置 */
|
|
31
31
|
this.flagMap = options.flagMap || {};
|
|
32
|
+
this.flagFunc = options.flagFunc;
|
|
32
33
|
this.baseURL = options.baseURL || '';
|
|
33
34
|
this.requests = options.requests || {};
|
|
34
35
|
/**
|
|
@@ -85,6 +86,18 @@ class RequestClass {
|
|
|
85
86
|
this.flagMap = Object.assign({}, this.flagMap, options || {});
|
|
86
87
|
return this;
|
|
87
88
|
}
|
|
89
|
+
getFlag(oldFlag) {
|
|
90
|
+
// 类型对
|
|
91
|
+
// 不存在
|
|
92
|
+
// 重新获取flag方法存在
|
|
93
|
+
if (typeof oldFlag == 'string' && !this.flagMap[oldFlag] && typeof this.flagFunc == 'function') {
|
|
94
|
+
// 重新加载flag
|
|
95
|
+
let newFlagArr = this.flagFunc();
|
|
96
|
+
// console.log(newFlagArr);
|
|
97
|
+
this.setFlag(newFlagArr);
|
|
98
|
+
}
|
|
99
|
+
return oldFlag;
|
|
100
|
+
}
|
|
88
101
|
/**
|
|
89
102
|
* 设置header参数
|
|
90
103
|
*/
|
|
@@ -258,7 +271,6 @@ class RequestClass {
|
|
|
258
271
|
}
|
|
259
272
|
|
|
260
273
|
// 全部默认加上 login_type
|
|
261
|
-
reqData.login_type = this.storeHandle.state.storeUser.has_login ? 1 : '';
|
|
262
274
|
Object.assign(request_setttings, {
|
|
263
275
|
data: reqData,
|
|
264
276
|
method: type
|
|
@@ -403,7 +415,7 @@ class RequestClass {
|
|
|
403
415
|
let apiUrl = '';
|
|
404
416
|
let apiUrlNoMsg = '';
|
|
405
417
|
if (flagOrUrl == 'flag') {
|
|
406
|
-
let apiFlag = argumentsArr[0];
|
|
418
|
+
let apiFlag = this.getFlag(argumentsArr[0]);
|
|
407
419
|
if (typeof apiFlag === 'string') {
|
|
408
420
|
apiFlag = apiFlag || '';
|
|
409
421
|
apiUrl = apiFlag == '' ? '' : this.flagMap[apiFlag] || '';
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<swiper
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
<swiper
|
|
3
|
+
class="cv-banner"
|
|
4
|
+
v-bind:style="cvBannerStyle"
|
|
5
|
+
:indicator-dots="indicatorDots"
|
|
6
|
+
indicator-color="rgba(255, 255, 255, .6)"
|
|
7
|
+
indicator-active-color="#ffffff"
|
|
8
|
+
:autoplay="autoplay"
|
|
9
|
+
:circular="circular"
|
|
10
|
+
:previous-margin="margin"
|
|
11
|
+
:next-margin="margin"
|
|
12
|
+
@change="onChange"
|
|
13
|
+
>
|
|
14
|
+
<swiper-item v-for="(item, index) in localDataLists" :key="index">
|
|
5
15
|
<view class="cv-banner-swiper-item">
|
|
6
16
|
<view class="cv-banner-swiper-item-box">
|
|
7
17
|
<image class="cv-banner-swiper-item-image" :src="item.image" mode="aspectFill" />
|
|
8
18
|
<view class="cv-banner-swiper-item-text" v-if="item.text">
|
|
9
|
-
{{item.text}}
|
|
19
|
+
{{ item.text }}
|
|
10
20
|
</view>
|
|
11
21
|
</view>
|
|
12
22
|
</view>
|
|
@@ -16,20 +26,19 @@
|
|
|
16
26
|
|
|
17
27
|
<script>
|
|
18
28
|
export default {
|
|
19
|
-
name:
|
|
29
|
+
name: 'cvBanner',
|
|
20
30
|
options: {
|
|
21
|
-
addGlobalClass: true
|
|
31
|
+
addGlobalClass: true
|
|
22
32
|
},
|
|
23
33
|
props: {
|
|
24
34
|
dataLists: {
|
|
25
35
|
type: Array,
|
|
26
36
|
default: []
|
|
27
|
-
|
|
28
37
|
},
|
|
29
38
|
paramConfig: {
|
|
30
39
|
type: Object,
|
|
31
40
|
default() {
|
|
32
|
-
return {}
|
|
41
|
+
return {};
|
|
33
42
|
}
|
|
34
43
|
},
|
|
35
44
|
height: {
|
|
@@ -58,7 +67,7 @@ export default {
|
|
|
58
67
|
localDataLists: [],
|
|
59
68
|
circular: true,
|
|
60
69
|
margin: '0px',
|
|
61
|
-
cvBannerStyle: ''
|
|
70
|
+
cvBannerStyle: '' /* 轮播图区域的样式 */
|
|
62
71
|
};
|
|
63
72
|
},
|
|
64
73
|
created: function () {
|
|
@@ -70,24 +79,24 @@ export default {
|
|
|
70
79
|
let localDataLists = [];
|
|
71
80
|
const paramImage = this.paramConfig.image || 'image',
|
|
72
81
|
paramText = this.paramConfig.text || 'text';
|
|
73
|
-
this.dataLists.forEach(element => {
|
|
82
|
+
this.dataLists.forEach((element) => {
|
|
74
83
|
localDataLists.push({
|
|
75
84
|
image: element[paramImage],
|
|
76
85
|
text: element[paramText]
|
|
77
|
-
})
|
|
86
|
+
});
|
|
78
87
|
});
|
|
79
88
|
this.localDataLists = localDataLists;
|
|
80
89
|
},
|
|
81
90
|
_dealStyle() {
|
|
82
|
-
this.cvBannerStyle = 'height:' + this.height + 'px;'
|
|
91
|
+
this.cvBannerStyle = 'height:' + this.height + 'px;';
|
|
83
92
|
},
|
|
84
93
|
onChange(e) {
|
|
85
94
|
this.$emit('change', e);
|
|
86
95
|
}
|
|
87
96
|
}
|
|
88
97
|
};
|
|
89
|
-
</script>
|
|
90
|
-
<style
|
|
98
|
+
</script>
|
|
99
|
+
<style>
|
|
91
100
|
.cv-banner {
|
|
92
101
|
width: 100%;
|
|
93
102
|
}
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<swiper
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
<swiper
|
|
3
|
+
class="cv-banner-card"
|
|
4
|
+
v-bind:style="cvBannerCardStyle"
|
|
5
|
+
:indicator-dots="indicatorDots"
|
|
6
|
+
indicator-color="rgba(255, 255, 255, .6)"
|
|
7
|
+
indicator-active-color="#ffffff"
|
|
8
|
+
:autoplay="autoplay"
|
|
9
|
+
:circular="circular"
|
|
10
|
+
:previous-margin="margin"
|
|
11
|
+
:next-margin="margin"
|
|
12
|
+
@change="onChange"
|
|
13
|
+
>
|
|
14
|
+
<swiper-item v-for="(item, index) in localDataLists" :key="index">
|
|
5
15
|
<view class="cv-banner-card-swiper-item">
|
|
6
|
-
<view class="cv-banner-card-swiper-item-box" :class="current == index?'swiper-item-selected':''">
|
|
16
|
+
<view class="cv-banner-card-swiper-item-box" :class="current == index ? 'swiper-item-selected' : ''">
|
|
7
17
|
<image class="cv-banner-card-swiper-item-image" :src="item.image" :mode="imageMode" />
|
|
8
18
|
<view class="cv-banner-card-swiper-item-text" v-if="item.text">
|
|
9
|
-
{{item.text}}
|
|
19
|
+
{{ item.text }}
|
|
10
20
|
</view>
|
|
11
21
|
</view>
|
|
12
22
|
</view>
|
|
@@ -16,20 +26,18 @@
|
|
|
16
26
|
|
|
17
27
|
<script>
|
|
18
28
|
export default {
|
|
19
|
-
name:
|
|
29
|
+
name: 'cvBannerCard',
|
|
20
30
|
options: {
|
|
21
|
-
addGlobalClass: true
|
|
31
|
+
addGlobalClass: true
|
|
22
32
|
},
|
|
23
33
|
props: {
|
|
24
34
|
dataLists: {
|
|
25
35
|
type: Array,
|
|
26
36
|
default: []
|
|
27
|
-
|
|
28
37
|
},
|
|
29
38
|
paramConfig: {
|
|
30
39
|
type: Object,
|
|
31
|
-
default: {
|
|
32
|
-
}
|
|
40
|
+
default: {}
|
|
33
41
|
},
|
|
34
42
|
height: {
|
|
35
43
|
type: Number,
|
|
@@ -66,7 +74,7 @@ export default {
|
|
|
66
74
|
circular: true,
|
|
67
75
|
localMargin: '35px',
|
|
68
76
|
current: 0,
|
|
69
|
-
cvBannerCardStyle: ''
|
|
77
|
+
cvBannerCardStyle: '' /* 轮播图区域的样式 */
|
|
70
78
|
};
|
|
71
79
|
},
|
|
72
80
|
created: function () {
|
|
@@ -78,16 +86,16 @@ export default {
|
|
|
78
86
|
let localDataLists = [];
|
|
79
87
|
const paramImage = this.paramConfig.image || 'image',
|
|
80
88
|
paramText = this.paramConfig.text || 'text';
|
|
81
|
-
this.dataLists.forEach(element => {
|
|
89
|
+
this.dataLists.forEach((element) => {
|
|
82
90
|
localDataLists.push({
|
|
83
91
|
image: element[paramImage],
|
|
84
92
|
text: element[paramText]
|
|
85
|
-
})
|
|
93
|
+
});
|
|
86
94
|
});
|
|
87
95
|
this.localDataLists = localDataLists;
|
|
88
96
|
},
|
|
89
97
|
_dealStyle() {
|
|
90
|
-
this.cvBannerCardStyle = 'height:' + this.height + 'px;'
|
|
98
|
+
this.cvBannerCardStyle = 'height:' + this.height + 'px;';
|
|
91
99
|
},
|
|
92
100
|
onChange(e) {
|
|
93
101
|
this.current = e.detail.current;
|
|
@@ -95,8 +103,8 @@ export default {
|
|
|
95
103
|
}
|
|
96
104
|
}
|
|
97
105
|
};
|
|
98
|
-
</script>
|
|
99
|
-
<style
|
|
106
|
+
</script>
|
|
107
|
+
<style>
|
|
100
108
|
.cv-banner-card {
|
|
101
109
|
width: 100%;
|
|
102
110
|
}
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
<script>
|
|
8
8
|
export default {
|
|
9
|
-
name:
|
|
9
|
+
name: 'cvBlock',
|
|
10
10
|
options: {
|
|
11
|
-
addGlobalClass: true
|
|
11
|
+
addGlobalClass: true
|
|
12
12
|
},
|
|
13
13
|
props: {
|
|
14
14
|
col: {
|
|
@@ -39,7 +39,7 @@ export default {
|
|
|
39
39
|
inject: {
|
|
40
40
|
cvGroupCol: {
|
|
41
41
|
default() {
|
|
42
|
-
return null
|
|
42
|
+
return null;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
},
|
|
@@ -59,7 +59,7 @@ export default {
|
|
|
59
59
|
let marginRight = this.marginRight ? this.marginRight : this.margin;
|
|
60
60
|
let marginTop = this.marginTop ? this.marginTop : this.margin;
|
|
61
61
|
let marginBottom = this.marginBottom ? this.marginBottom : this.margin;
|
|
62
|
-
let cvBoxStyle = ''
|
|
62
|
+
let cvBoxStyle = '';
|
|
63
63
|
if (col > 0) {
|
|
64
64
|
cvBoxStyle += 'width: calc(100% / ' + col + ' - ' + (marginLeft + marginRight) + 'px);';
|
|
65
65
|
cvBoxStyle += 'margin-left:' + marginLeft + 'px;';
|
|
@@ -70,11 +70,11 @@ export default {
|
|
|
70
70
|
this.cvBoxStyle = cvBoxStyle;
|
|
71
71
|
},
|
|
72
72
|
onClick() {
|
|
73
|
-
this.$emit('click')
|
|
73
|
+
this.$emit('click');
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
|
-
</script>
|
|
77
|
+
</script>
|
|
78
78
|
<style>
|
|
79
79
|
/* #ifdef MP-WEIXIN */
|
|
80
80
|
cv-block {
|
package/ui-cv/cv-box/cv-box.vue
CHANGED
|
@@ -6,16 +6,15 @@
|
|
|
6
6
|
|
|
7
7
|
<script>
|
|
8
8
|
export default {
|
|
9
|
-
name:
|
|
9
|
+
name: 'cvBox',
|
|
10
10
|
options: {
|
|
11
|
-
addGlobalClass: true
|
|
11
|
+
addGlobalClass: true
|
|
12
12
|
},
|
|
13
13
|
props: {
|
|
14
14
|
/* 预留参数 用于接收子级 cv-col间距参数 */
|
|
15
15
|
gutter: {
|
|
16
16
|
type: String,
|
|
17
17
|
default: ''
|
|
18
|
-
|
|
19
18
|
},
|
|
20
19
|
margin: {
|
|
21
20
|
type: String,
|
|
@@ -54,13 +53,13 @@ export default {
|
|
|
54
53
|
marginLeft: this.margin ? this.margin + 'px' : '',
|
|
55
54
|
marginRight: this.margin ? this.margin + 'px' : '',
|
|
56
55
|
background: this.backgroundColor,
|
|
57
|
-
padding: this.padding ? this.padding + 'px' : ''
|
|
58
|
-
}
|
|
56
|
+
padding: this.padding ? this.padding + 'px' : ''
|
|
57
|
+
};
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
60
|
};
|
|
62
|
-
</script>
|
|
63
|
-
<style
|
|
61
|
+
</script>
|
|
62
|
+
<style>
|
|
64
63
|
.cv-box {
|
|
65
64
|
background-color: #fff;
|
|
66
65
|
padding: 5px 0;
|
|
@@ -1,35 +1,54 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="cv-button-wrap">
|
|
3
|
-
<button v-if="type=='pay'" class="cv-button-item cv-button-pay" type="primary" @click="parentClick">{{label}}</button>
|
|
4
|
-
<button v-else-if="type=='save'" class="cv-button-item cv-button-save" type="error" @click="parentClick">
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<button
|
|
8
|
-
|
|
3
|
+
<button v-if="type == 'pay'" class="cv-button-item cv-button-pay" type="primary" @click="parentClick">{{ label }}</button>
|
|
4
|
+
<button v-else-if="type == 'save'" class="cv-button-item cv-button-save" type="error" @click="parentClick">
|
|
5
|
+
{{ label }}
|
|
6
|
+
</button>
|
|
7
|
+
<button
|
|
8
|
+
v-else-if="type == 'submit'"
|
|
9
|
+
class="cv-button-item cv-button-save"
|
|
10
|
+
type="primary"
|
|
11
|
+
form-type="submit"
|
|
12
|
+
@click="parentClick"
|
|
13
|
+
>
|
|
14
|
+
{{ label }}
|
|
15
|
+
</button>
|
|
16
|
+
<button
|
|
17
|
+
v-else-if="type == 'reset'"
|
|
18
|
+
class="cv-button-item cv-button-cancel"
|
|
19
|
+
type="primary"
|
|
20
|
+
form-type="reset"
|
|
21
|
+
@click="parentClick"
|
|
22
|
+
>
|
|
23
|
+
{{ label }}
|
|
24
|
+
</button>
|
|
25
|
+
<button v-else-if="type == 'cancel'" class="cv-button-item cv-button-cancel" type="primary" @click="parentClick">
|
|
26
|
+
{{ label }}
|
|
27
|
+
</button>
|
|
28
|
+
<button v-else class="cv-button-item" type="primary" @click="parentClick">{{ label }}</button>
|
|
9
29
|
<!-- :style="{ background: themesData.color }" -->
|
|
10
30
|
</view>
|
|
11
31
|
</template>
|
|
12
32
|
|
|
13
33
|
<script>
|
|
14
34
|
export default {
|
|
15
|
-
name:
|
|
35
|
+
name: 'cvButton',
|
|
16
36
|
props: {
|
|
17
37
|
label: {
|
|
18
38
|
type: String,
|
|
19
|
-
default:
|
|
39
|
+
default: 'save'
|
|
20
40
|
},
|
|
21
41
|
type: {
|
|
22
42
|
type: String,
|
|
23
|
-
default:
|
|
43
|
+
default: 'save'
|
|
24
44
|
},
|
|
25
45
|
click: {
|
|
26
46
|
type: Function
|
|
27
|
-
}
|
|
28
|
-
|
|
47
|
+
}
|
|
29
48
|
},
|
|
30
49
|
data() {
|
|
31
50
|
return {
|
|
32
|
-
themesData: {}
|
|
51
|
+
themesData: {} // 获取用户主题配置
|
|
33
52
|
};
|
|
34
53
|
},
|
|
35
54
|
created() {
|
|
@@ -45,7 +64,7 @@ export default {
|
|
|
45
64
|
},
|
|
46
65
|
parentClick(evt) {
|
|
47
66
|
this.$emit('click', evt);
|
|
48
|
-
}
|
|
67
|
+
}
|
|
49
68
|
}
|
|
50
69
|
};
|
|
51
70
|
</script>
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="cv-cell">
|
|
3
3
|
<view class="cv-cell-box">
|
|
4
|
-
<view class="cv-cell-main" :class="
|
|
4
|
+
<view class="cv-cell-main" :class="sublabel && 'cv-cell-main-big'" @tap="jump">
|
|
5
5
|
<view class="cv-cell-main-left">
|
|
6
|
-
<view class="cv-cell-main-left-icon" v-if="image|| $slots.before">
|
|
6
|
+
<view class="cv-cell-main-left-icon" v-if="image || $slots.before">
|
|
7
7
|
<image class="cv-cell-main-left-icon-image" :src="image" mode="aspectFit" v-if="image" />
|
|
8
8
|
<slot name="before" v-else />
|
|
9
9
|
</view>
|
|
10
|
-
<view class="cv-cell-main-left-text" :class="!image && !$slots.before?'cv-cell-main-left-text-noimage':''">
|
|
10
|
+
<view class="cv-cell-main-left-text" :class="!image && !$slots.before ? 'cv-cell-main-left-text-noimage' : ''">
|
|
11
11
|
<view class="cv-cell-main-left-text-intact" v-if="!sublabel">
|
|
12
|
-
{{label}}
|
|
12
|
+
{{ label }}
|
|
13
13
|
</view>
|
|
14
14
|
<view class="cv-cell-main-left-text-double" v-else>
|
|
15
15
|
<view class="cv-cell-main-left-text-label">
|
|
16
|
-
{{label}}
|
|
16
|
+
{{ label }}
|
|
17
17
|
</view>
|
|
18
18
|
<view class="cv-cell-main-left-text-sublabel">
|
|
19
|
-
{{sublabel}}
|
|
19
|
+
{{ sublabel }}
|
|
20
20
|
</view>
|
|
21
21
|
</view>
|
|
22
22
|
</view>
|
|
23
23
|
</view>
|
|
24
|
-
<view class="cv-cell-main-center" :class="url=='' && !$listeners.click?'cv-cell-main-center-nourl':''">
|
|
24
|
+
<view class="cv-cell-main-center" :class="url == '' && !$listeners.click ? 'cv-cell-main-center-nourl' : ''">
|
|
25
25
|
<view class="cv-cell-main-center-intact" v-if="!subexplain">
|
|
26
|
-
{{explain}}
|
|
26
|
+
{{ explain }}
|
|
27
27
|
</view>
|
|
28
28
|
<view class="cv-cell-main-center-double" v-else>
|
|
29
29
|
<view class="cv-cell-main-center-explain">
|
|
30
|
-
{{explain}}
|
|
30
|
+
{{ explain }}
|
|
31
31
|
</view>
|
|
32
32
|
<view class="cv-cell-main-center-subexplain">
|
|
33
|
-
{{subexplain}}
|
|
33
|
+
{{ subexplain }}
|
|
34
34
|
</view>
|
|
35
35
|
</view>
|
|
36
36
|
</view>
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
</view>
|
|
41
41
|
</view>
|
|
42
42
|
<view class="cv-cell-message" v-if="message">
|
|
43
|
-
{{message}}
|
|
43
|
+
{{ message }}
|
|
44
44
|
</view>
|
|
45
45
|
</view>
|
|
46
46
|
</view>
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
|
|
49
49
|
<script>
|
|
50
50
|
export default {
|
|
51
|
-
name:
|
|
51
|
+
name: 'cvCell',
|
|
52
52
|
options: {
|
|
53
|
-
addGlobalClass: true
|
|
53
|
+
addGlobalClass: true
|
|
54
54
|
},
|
|
55
55
|
props: {
|
|
56
56
|
url: {
|
|
@@ -87,7 +87,6 @@ export default {
|
|
|
87
87
|
type: String,
|
|
88
88
|
default: ''
|
|
89
89
|
}
|
|
90
|
-
|
|
91
90
|
},
|
|
92
91
|
watch: {
|
|
93
92
|
dataLists(newVal) {
|
|
@@ -95,9 +94,7 @@ export default {
|
|
|
95
94
|
}
|
|
96
95
|
},
|
|
97
96
|
data() {
|
|
98
|
-
return {
|
|
99
|
-
|
|
100
|
-
};
|
|
97
|
+
return {};
|
|
101
98
|
},
|
|
102
99
|
created: function () {
|
|
103
100
|
// console.log(this.$slots);
|
|
@@ -107,35 +104,34 @@ export default {
|
|
|
107
104
|
if (typeof this.url == 'string' && this.url) {
|
|
108
105
|
const url = this.url;
|
|
109
106
|
switch (this.urlType) {
|
|
110
|
-
case 'redirectTo'
|
|
107
|
+
case 'redirectTo': //关闭当前页面,跳转到应用内的某个页面。
|
|
111
108
|
uni.redirectTo({
|
|
112
109
|
url: this.url
|
|
113
110
|
});
|
|
114
111
|
break;
|
|
115
|
-
case 'reLaunch'
|
|
112
|
+
case 'reLaunch': //关闭所有页面,打开到应用内的某个页面。
|
|
116
113
|
uni.reLaunch({
|
|
117
114
|
url: this.url
|
|
118
115
|
});
|
|
119
116
|
break;
|
|
120
|
-
case 'switchTab'
|
|
117
|
+
case 'switchTab': //跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面。
|
|
121
118
|
uni.switchTab({
|
|
122
119
|
url: this.url
|
|
123
120
|
});
|
|
124
121
|
break;
|
|
125
|
-
default
|
|
122
|
+
default: //默认【navigateTo】 保留当前页面,跳转到应用内的某个页面
|
|
126
123
|
uni.navigateTo({
|
|
127
124
|
url: this.url
|
|
128
125
|
});
|
|
129
126
|
}
|
|
130
|
-
|
|
131
127
|
} else {
|
|
132
|
-
this.$emit('click')
|
|
128
|
+
this.$emit('click');
|
|
133
129
|
}
|
|
134
130
|
}
|
|
135
131
|
}
|
|
136
132
|
};
|
|
137
|
-
</script>
|
|
138
|
-
<style
|
|
133
|
+
</script>
|
|
134
|
+
<style>
|
|
139
135
|
/* #ifndef MP-WEIXIN */
|
|
140
136
|
.cv-cell:last-child .cv-cell-main {
|
|
141
137
|
border-bottom: none;
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<cv-form-item
|
|
2
|
+
<cv-form-item
|
|
3
|
+
:label="label"
|
|
4
|
+
:must="must"
|
|
5
|
+
:message="message"
|
|
6
|
+
:messageDisplay="messageDisplay"
|
|
7
|
+
:labelWidth="localLabelWidth"
|
|
8
|
+
:layout="localLayout"
|
|
9
|
+
>
|
|
3
10
|
<view class="cv-checkbox">
|
|
4
11
|
<checkbox-group @change="checkboxChange">
|
|
5
12
|
<label class="cv-checkbox-item" v-for="item in items" :value="value" :key="item.value">
|
|
6
13
|
<view>
|
|
7
|
-
<checkbox :value="item.value" :checked="item.checked" style="transform:scale(0.7)" />
|
|
14
|
+
<checkbox :value="item.value" :checked="item.checked" style="transform: scale(0.7)" />
|
|
8
15
|
</view>
|
|
9
|
-
<view>{{item.text}}</view>
|
|
16
|
+
<view>{{ item.text }}</view>
|
|
10
17
|
</label>
|
|
11
18
|
</checkbox-group>
|
|
12
19
|
</view>
|
|
@@ -17,10 +24,8 @@
|
|
|
17
24
|
import MixinsCheckbox from '../mixins/mixins-checkbox.js';
|
|
18
25
|
export default {
|
|
19
26
|
mixins: [MixinsCheckbox],
|
|
20
|
-
name:
|
|
21
|
-
inject: {
|
|
22
|
-
|
|
23
|
-
},
|
|
27
|
+
name: 'cvCheckbox',
|
|
28
|
+
inject: {},
|
|
24
29
|
props: {
|
|
25
30
|
//默认输入框内容
|
|
26
31
|
value: {
|
|
@@ -29,9 +34,7 @@ export default {
|
|
|
29
34
|
}
|
|
30
35
|
},
|
|
31
36
|
data() {
|
|
32
|
-
return {
|
|
33
|
-
|
|
34
|
-
};
|
|
37
|
+
return {};
|
|
35
38
|
},
|
|
36
39
|
|
|
37
40
|
created: function () {
|
|
@@ -46,7 +49,6 @@ export default {
|
|
|
46
49
|
let original = [];
|
|
47
50
|
if (this.dataUrl) {
|
|
48
51
|
//网络请求
|
|
49
|
-
|
|
50
52
|
} else {
|
|
51
53
|
original = this.dataLists;
|
|
52
54
|
}
|
|
@@ -65,30 +67,29 @@ export default {
|
|
|
65
67
|
let text = data[dataText];
|
|
66
68
|
let value = data[dataValue];
|
|
67
69
|
if (value) {
|
|
68
|
-
value = value.toString()
|
|
70
|
+
value = value.toString();
|
|
69
71
|
}
|
|
70
72
|
if (data[dataChecked] == true) {
|
|
71
|
-
checked = true
|
|
73
|
+
checked = true;
|
|
72
74
|
}
|
|
73
75
|
let localVal = this.localVal;
|
|
74
76
|
//写入已选选项
|
|
75
77
|
for (const ii in localVal) {
|
|
76
78
|
if (this.dataType == 'text') {
|
|
77
79
|
if (localVal[ii] == text) {
|
|
78
|
-
checked = true
|
|
80
|
+
checked = true;
|
|
79
81
|
}
|
|
80
82
|
} else {
|
|
81
83
|
if (localVal[ii] == value) {
|
|
82
|
-
checked = true
|
|
84
|
+
checked = true;
|
|
83
85
|
}
|
|
84
|
-
|
|
85
86
|
}
|
|
86
87
|
}
|
|
87
88
|
items.push({
|
|
88
89
|
value: value,
|
|
89
90
|
text: text,
|
|
90
91
|
checked: checked
|
|
91
|
-
})
|
|
92
|
+
});
|
|
92
93
|
}
|
|
93
94
|
return items;
|
|
94
95
|
},
|
|
@@ -96,21 +97,20 @@ export default {
|
|
|
96
97
|
var items = this.items,
|
|
97
98
|
values = e.detail.value;
|
|
98
99
|
for (var i = 0, lenI = items.length; i < lenI; ++i) {
|
|
99
|
-
const item = items[i]
|
|
100
|
+
const item = items[i];
|
|
100
101
|
if (values.includes(item.value)) {
|
|
101
102
|
this.$set(item, 'checked', true);
|
|
102
103
|
} else {
|
|
103
|
-
this.$set(item, 'checked', false)
|
|
104
|
+
this.$set(item, 'checked', false);
|
|
104
105
|
}
|
|
105
106
|
}
|
|
106
107
|
let localVal = [];
|
|
107
108
|
for (let i in items) {
|
|
108
109
|
if (items[i].checked) {
|
|
109
110
|
if (this.dataType == 'text') {
|
|
110
|
-
localVal.push(items[i].text)
|
|
111
|
+
localVal.push(items[i].text);
|
|
111
112
|
} else {
|
|
112
|
-
localVal.push(items[i].value)
|
|
113
|
-
|
|
113
|
+
localVal.push(items[i].value);
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
}
|