@10yun/cv-mobile-ui 0.3.26 → 0.4.2
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/build/parse-pages.js +2 -2
- package/package.json +1 -1
- package/ui-cv/README.md +3 -0
- package/ui-cv/cv-badge/cv-badge.vue +249 -0
- package/ui-cv/cv-banner/cv-banner.vue +1 -1
- package/ui-cv/cv-banner-card/cv-banner-card.vue +1 -1
- package/ui-cv/cv-block/cv-block.vue +1 -1
- package/ui-cv/cv-box/cv-box.vue +1 -1
- package/ui-cv/cv-calendar/calendar.js +963 -0
- package/ui-cv/cv-calendar/cv-calendar-item.vue +198 -0
- package/ui-cv/cv-calendar/cv-calendar.vue +508 -0
- package/{ui-uni/uni-calendar → ui-cv/cv-calendar}/util.js +0 -0
- package/ui-cv/cv-card/cv-card.vue +427 -0
- package/ui-cv/cv-cell/cv-cell.vue +1 -1
- package/ui-cv/cv-checkbox-group/cv-checkbox-group.vue +227 -0
- package/ui-cv/cv-checkbox-opt-base/cv-checkbox-opt-base.vue +57 -0
- package/ui-cv/cv-checkbox-opt-tag/cv-checkbox-opt-tag.vue +107 -0
- package/ui-cv/cv-code-sms/cv-code-sms.vue +23 -42
- package/ui-cv/cv-col/cv-col.vue +2965 -0
- package/ui-cv/cv-collapse/cv-collapse.vue +146 -0
- package/ui-cv/cv-collapse-item/cv-collapse-item.vue +395 -0
- package/ui-cv/cv-combox/cv-combox.vue +250 -0
- package/ui-cv/cv-countdown/cv-countdown.vue +245 -0
- package/ui-cv/cv-data-checkbox/cv-data-checkbox.vue +841 -0
- package/{ui-uni/uni-data-indexed-list → ui-cv/cv-data-indexed-list}/clientdb.js +0 -0
- package/ui-cv/cv-data-indexed-list/cv-data-indexed-list-item.vue +154 -0
- package/ui-cv/cv-data-indexed-list/cv-data-indexed-list.vue +376 -0
- package/ui-cv/cv-data-picker/cv-data-picker.vue +486 -0
- package/{ui-uni/uni-data-picker → ui-cv/cv-data-picker}/keypress.js +0 -0
- package/{ui-uni/uni-data-pickerview/uni-data-picker.js → ui-cv/cv-data-pickerview/cv-data-picker.js} +0 -0
- package/ui-cv/cv-data-pickerview/cv-data-pickerview.vue +304 -0
- package/ui-cv/cv-dateformat/cv-dateformat.vue +86 -0
- package/{ui-uni/uni-dateformat → ui-cv/cv-dateformat}/date-format.js +0 -0
- package/{ui-uni/uni-datetime-picker → ui-cv/cv-datetime-picker}/calendar-item.vue +0 -0
- package/{ui-uni/uni-datetime-picker → ui-cv/cv-datetime-picker}/calendar.js +0 -0
- package/ui-cv/cv-datetime-picker/calendar.vue +761 -0
- package/ui-cv/cv-datetime-picker/cv-datetime-picker.vue +958 -0
- package/{ui-uni/uni-datetime-picker → ui-cv/cv-datetime-picker}/keypress.js +0 -0
- package/ui-cv/cv-datetime-picker/time-picker.vue +907 -0
- package/{ui-uni/uni-datetime-picker → ui-cv/cv-datetime-picker}/util.js +0 -0
- package/ui-cv/cv-dialog-bottom/cv-dialog-bottom.vue +1 -1
- package/ui-cv/cv-dialog-full/cv-dialog-full.vue +1 -1
- package/ui-cv/cv-dialog-loading/cv-dialog-loading.vue +3 -3
- package/ui-cv/cv-drawer/cv-drawer.vue +185 -0
- package/{ui-uni/uni-drawer → ui-cv/cv-drawer}/keypress.js +14 -14
- package/{ui-uni/uni-easyinput → ui-cv/cv-easyinput}/common.js +0 -0
- package/ui-cv/cv-easyinput/cv-easyinput.vue +514 -0
- package/ui-cv/cv-editor-parse/readme.md +2 -3
- package/ui-cv/{cv-editor → cv-editor-quill}/compressImage.vue +0 -0
- package/ui-cv/{cv-editor/cv-editor.vue → cv-editor-quill/cv-editor-quill.vue} +3 -23
- package/ui-cv/{cv-editor → cv-editor-quill}/editor-icon.css +0 -0
- package/ui-cv/{cv-editor → cv-editor-quill}/editor-icon.ttf +0 -0
- package/ui-cv/{cv-editor → cv-editor-quill}/index.js +0 -0
- package/ui-cv/cv-fab/cv-fab.vue +465 -0
- package/{ui-uni/uni-fab/uni-fab.vue.bak → ui-cv/cv-fab/cv-fab.vue.bak} +2 -2
- package/ui-cv/cv-fav/cv-fav.vue +150 -0
- package/{ui-uni/uni-file-picker → ui-cv/cv-file-picker}/choose-and-upload-file.js +0 -0
- package/ui-cv/cv-file-picker/cv-file-picker.vue +619 -0
- package/{ui-uni/uni-file-picker → ui-cv/cv-file-picker}/upload-file.vue +0 -0
- package/{ui-uni/uni-file-picker → ui-cv/cv-file-picker}/upload-image.vue +0 -0
- package/{ui-uni/uni-file-picker → ui-cv/cv-file-picker}/utils.js +0 -0
- package/ui-cv/cv-form-base/cv-form-base.vue +470 -0
- package/ui-cv/cv-form-base/validate.js +477 -0
- package/ui-cv/cv-form-group/cv-form-group.vue +123 -80
- package/ui-cv/cv-form-group/cv-form-group2.vue +80 -0
- package/ui-cv/cv-form-item/cv-form-item.vue +482 -174
- package/ui-cv/cv-form-item/cv-form-item2.vue +215 -0
- package/ui-cv/cv-form-merge/cv-form-merge.vue +1 -1
- package/ui-cv/cv-geo-local/cv-geo-local.vue +14 -26
- package/{ui-uni/uni-goods-nav/uni-goods-nav.vue → ui-cv/cv-goods-nav/cv-goods-nav.vue} +1 -1
- package/ui-cv/cv-grid-group/cv-grid-group.vue +148 -0
- package/ui-cv/cv-grid-item/cv-grid-item.vue +132 -0
- package/ui-cv/cv-icon2/cv-icon2.vue +78 -0
- package/ui-cv/cv-icon2/icons.js +132 -0
- package/{ui-uni/uni-icons → ui-cv/cv-icon2}/uni.ttf +0 -0
- package/ui-cv/cv-icons/cv-icons.vue +1 -1
- package/ui-cv/cv-indexed-list/cv-indexed-list-item.vue +154 -0
- package/ui-cv/cv-indexed-list/cv-indexed-list.vue +371 -0
- package/ui-cv/cv-info/cv-info.vue +5 -20
- package/ui-cv/cv-input-btn/cv-input-btn.vue +25 -43
- package/ui-cv/cv-input-digit/cv-input-digit.vue +61 -28
- package/ui-cv/cv-input-idcard/cv-input-idcard.vue +47 -29
- package/ui-cv/cv-input-number/cv-input-number.vue +60 -28
- package/ui-cv/cv-input-password/cv-input-password.vue +80 -30
- package/ui-cv/cv-input-text/cv-input-text.vue +55 -37
- package/ui-cv/cv-link2/cv-link2.vue +130 -0
- package/ui-cv/cv-list/cv-list.vue +107 -0
- package/ui-cv/cv-list/cv-refresh.vue +65 -0
- package/{ui-uni/uni-list → ui-cv/cv-list}/uni-refresh.wxs +0 -0
- package/ui-cv/cv-list-ad/cv-list-ad.vue +113 -0
- package/{ui-uni/uni-list-chat/uni-list-chat.scss → ui-cv/cv-list-chat/cv-list-chat.scss} +0 -0
- package/{ui-uni/uni-list-chat/uni-list-chat.vue → ui-cv/cv-list-chat/cv-list-chat.vue} +0 -0
- package/ui-cv/cv-list-item/cv-list-item.vue +449 -0
- package/ui-cv/cv-load-more/config.json +9 -9
- package/ui-cv/cv-load-more/cv-load-more.vue +34 -5
- package/ui-cv/cv-message/cv-message.vue +1 -1
- package/ui-cv/cv-nav-bar/cv-nav-bar.vue +256 -0
- package/{ui-uni/uni-nav-bar/uni-status-bar.vue → ui-cv/cv-nav-bar/cv-status-bar.vue} +0 -0
- package/ui-cv/cv-nav-col/cv-nav-col.vue +1 -1
- package/ui-cv/cv-nav-row/cv-nav-row.vue +1 -1
- package/ui-cv/cv-notice-bar/cv-notice-bar.vue +453 -0
- package/ui-cv/cv-number-box/cv-number-box.vue +223 -0
- package/ui-cv/cv-pagination/cv-pagination.vue +397 -0
- package/ui-cv/cv-picker-date/cv-picker-date.vue +17 -27
- package/ui-cv/cv-picker-datetime/cv-picker-datetime.vue +31 -41
- package/ui-cv/cv-picker-datetime5/cv-picker-datetime5.vue +19 -29
- package/ui-cv/cv-picker-region/cv-picker-region.vue +23 -33
- package/ui-cv/cv-picker-time/cv-picker-time.vue +16 -26
- package/ui-cv/cv-picker1/cv-picker1.vue +16 -28
- package/ui-cv/cv-picker2/cv-picker2.vue +22 -32
- package/ui-cv/cv-picker3/cv-picker3.vue +34 -44
- package/ui-cv/cv-popup/cv-popup.vue +429 -0
- package/{ui-uni/uni-popup → ui-cv/cv-popup}/keypress.js +0 -0
- package/{ui-uni/uni-popup → ui-cv/cv-popup}/popup.js +0 -0
- package/{ui-uni/uni-popup-dialog/uni-popup-dialog.vue → ui-cv/cv-popup-dialog/cv-popup-dialog.vue} +0 -0
- package/{ui-uni/uni-popup-dialog → ui-cv/cv-popup-dialog}/keypress.js +0 -0
- package/ui-cv/cv-popup-message/cv-popup-message.vue +143 -0
- package/{ui-uni/uni-popup-share/uni-popup-share.vue → ui-cv/cv-popup-share/cv-popup-share.vue} +0 -0
- package/ui-cv/cv-radio-group/cv-radio-group.vue +185 -0
- package/ui-cv/cv-radio-opt-base/cv-radio-opt-base.vue +57 -0
- package/ui-cv/cv-radio-opt-tag/cv-radio-opt-tag.vue +107 -0
- package/ui-cv/cv-rate/cv-rate.vue +13 -17
- package/ui-cv/cv-rate/uni-rate.vue +358 -0
- package/ui-cv/cv-row/cv-row.vue +157 -0
- package/ui-cv/cv-search/cv-search.vue +4 -4
- package/ui-cv/cv-search-bar/cv-search-bar.vue +280 -0
- package/{ui-uni/uni-section/uni-section.vue → ui-cv/cv-section/cv-section.vue} +0 -0
- package/{ui-uni/uni-segmented-control/uni-segmented-control.vue → ui-cv/cv-segmented-control/cv-segmented-control.vue} +0 -0
- package/ui-cv/cv-skeleton/cv-skeleton2.vue +5 -5
- package/ui-cv/cv-specs/cv-specs.vue +1 -1
- package/{ui-uni/uni-status-bar/uni-status-bar.vue → ui-cv/cv-status-bar/cv-status-bar.vue} +0 -0
- package/ui-cv/cv-steps/cv-steps.vue +293 -0
- package/{ui-uni/uni-swipe-action/uni-swipe-action.vue → ui-cv/cv-swipe-action/cv-swipe-action.vue} +0 -0
- package/{ui-uni/uni-swipe-action-item → ui-cv/cv-swipe-action-item}/bindingx.js +0 -0
- package/{ui-uni/uni-swipe-action-item/uni-swipe-action-item.vue → ui-cv/cv-swipe-action-item/cv-swipe-action-item.vue} +0 -0
- package/{ui-uni/uni-swipe-action-item → ui-cv/cv-swipe-action-item}/index.wxs +0 -0
- package/{ui-uni/uni-swipe-action-item → ui-cv/cv-swipe-action-item}/isPC.js +0 -0
- package/{ui-uni/uni-swipe-action-item → ui-cv/cv-swipe-action-item}/mpalipay.js +0 -0
- package/{ui-uni/uni-swipe-action-item → ui-cv/cv-swipe-action-item}/mpother.js +0 -0
- package/{ui-uni/uni-swipe-action-item → ui-cv/cv-swipe-action-item}/mpwxs.js +0 -0
- package/ui-cv/cv-swiper-dot/cv-swiper-dot.vue +255 -0
- package/ui-cv/cv-switch/cv-switch.vue +5 -9
- package/ui-cv/cv-table/cv-table.vue +460 -0
- package/ui-cv/cv-tag/cv-tag.vue +276 -0
- package/ui-cv/cv-tbody/cv-tbody.vue +28 -0
- package/ui-cv/cv-td/cv-td.vue +93 -0
- package/{ui-uni/uni-test/uni-test.vue → ui-cv/cv-test/cv-test.vue} +0 -0
- package/ui-cv/cv-textarea/cv-textarea.vue +56 -41
- package/ui-cv/cv-th/cv-th.vue +270 -0
- package/{ui-uni/uni-th → ui-cv/cv-th}/filter-dropdown.vue +0 -0
- package/ui-cv/cv-thead/cv-thead.vue +114 -0
- package/ui-cv/cv-title/cv-title.vue +168 -0
- package/ui-cv/cv-tr/cv-tr.vue +166 -0
- package/{ui-uni/uni-tr → ui-cv/cv-tr}/table-checkbox.vue +0 -0
- package/{ui-uni/uni-transition → ui-cv/cv-transition}/createAnimation.js +0 -0
- package/ui-cv/cv-transition/cv-transition.vue +279 -0
- package/ui-cv/cv-upload-avatar/cv-upload-avatar.vue +24 -22
- package/ui-cv/cv-upload-img/cv-upload-img.vue +1 -1
- package/ui-cv/mixins/mixins-input.js +20 -29
- package/ui-cv/mixins/mixins-picker.js +1 -13
- package/ui-uni/amap-wx/js/util.js +158 -166
- package/ui-uni/product.vue +52 -52
- package/ui-uni/u-charts/u-charts.js +1092 -743
- package/ui-cv/cv-checkbox/cv-checkbox.vue +0 -140
- package/ui-cv/cv-checkbox-tag/cv-checkbox-tag.vue +0 -164
- package/ui-cv/cv-nav-group/cv-nav-group.vue +0 -33
- package/ui-cv/cv-radio/cv-radio.vue +0 -111
- package/ui-cv/cv-radio-sex/cv-radio-sex.vue +0 -80
- package/ui-cv/cv-radio-tag/cv-radio-tag.vue +0 -133
- package/ui-cv/mixins/mixins-checkbox.js +0 -71
- package/ui-cv/mixins/mixins-common.js +0 -53
- package/ui-cv/mixins/mixins-radio.js +0 -84
- package/ui-uni/page-foot/page-foot.vue +0 -38
- package/ui-uni/page-head/page-head.vue +0 -16
- package/ui-uni/u-link/u-link.vue +0 -59
- package/ui-uni/uni-badge/uni-badge.vue +0 -250
- package/ui-uni/uni-calendar/calendar.js +0 -546
- package/ui-uni/uni-calendar/uni-calendar-item.vue +0 -171
- package/ui-uni/uni-calendar/uni-calendar.vue +0 -504
- package/ui-uni/uni-card/uni-card.vue +0 -420
- package/ui-uni/uni-col/uni-col.vue +0 -2968
- package/ui-uni/uni-collapse/uni-collapse.vue +0 -146
- package/ui-uni/uni-collapse-item/uni-collapse-item.vue +0 -378
- package/ui-uni/uni-combox/uni-combox.vue +0 -237
- package/ui-uni/uni-countdown/uni-countdown.vue +0 -234
- package/ui-uni/uni-data-checkbox/uni-data-checkbox.vue +0 -792
- package/ui-uni/uni-data-indexed-list/uni-data-indexed-list-item.vue +0 -142
- package/ui-uni/uni-data-indexed-list/uni-data-indexed-list.vue +0 -364
- package/ui-uni/uni-data-picker/uni-data-picker.vue +0 -468
- package/ui-uni/uni-data-pickerview/uni-data-pickerview.vue +0 -298
- package/ui-uni/uni-dateformat/uni-dateformat.vue +0 -88
- package/ui-uni/uni-datetime-picker/calendar.vue +0 -747
- package/ui-uni/uni-datetime-picker/time-picker.vue +0 -899
- package/ui-uni/uni-datetime-picker/uni-datetime-picker.vue +0 -874
- package/ui-uni/uni-drawer/uni-drawer.vue +0 -178
- package/ui-uni/uni-easyinput/uni-easyinput.vue +0 -438
- package/ui-uni/uni-fab/uni-fab.vue +0 -443
- package/ui-uni/uni-fav/uni-fav.vue +0 -136
- package/ui-uni/uni-file-picker/uni-file-picker.vue +0 -614
- package/ui-uni/uni-forms/uni-forms.vue +0 -467
- package/ui-uni/uni-forms/validate.js +0 -486
- package/ui-uni/uni-forms-item/uni-forms-item.vue +0 -500
- package/ui-uni/uni-grid/uni-grid.vue +0 -141
- package/ui-uni/uni-grid-item/uni-grid-item.vue +0 -123
- package/ui-uni/uni-group/uni-group.vue +0 -123
- package/ui-uni/uni-icons/icons.js +0 -132
- package/ui-uni/uni-icons/uni-icons.vue +0 -72
- package/ui-uni/uni-indexed-list/uni-indexed-list-item.vue +0 -142
- package/ui-uni/uni-indexed-list/uni-indexed-list.vue +0 -357
- package/ui-uni/uni-link/uni-link.vue +0 -117
- package/ui-uni/uni-list/uni-list.vue +0 -107
- package/ui-uni/uni-list/uni-refresh.vue +0 -65
- package/ui-uni/uni-list-ad/uni-list-ad.vue +0 -106
- package/ui-uni/uni-list-item/uni-list-item.vue +0 -428
- package/ui-uni/uni-load-more/uni-load-more.vue +0 -366
- package/ui-uni/uni-nav-bar/uni-nav-bar.vue +0 -244
- package/ui-uni/uni-notice-bar/uni-notice-bar.vue +0 -394
- package/ui-uni/uni-number-box/uni-number-box.vue +0 -224
- package/ui-uni/uni-pagination/uni-pagination.vue +0 -376
- package/ui-uni/uni-popup/uni-popup.vue +0 -412
- package/ui-uni/uni-popup-message/uni-popup-message.vue +0 -143
- package/ui-uni/uni-rate/uni-rate.vue +0 -357
- package/ui-uni/uni-row/uni-row.vue +0 -155
- package/ui-uni/uni-search-bar/uni-search-bar.vue +0 -262
- package/ui-uni/uni-steps/uni-steps.vue +0 -250
- package/ui-uni/uni-swiper-dot/uni-swiper-dot.vue +0 -205
- package/ui-uni/uni-table/uni-table.vue +0 -455
- package/ui-uni/uni-tag/uni-tag.vue +0 -283
- package/ui-uni/uni-tbody/uni-tbody.vue +0 -30
- package/ui-uni/uni-td/uni-td.vue +0 -88
- package/ui-uni/uni-th/uni-th.vue +0 -259
- package/ui-uni/uni-thead/uni-thead.vue +0 -114
- package/ui-uni/uni-title/uni-title.vue +0 -171
- package/ui-uni/uni-tr/uni-tr.vue +0 -156
- package/ui-uni/uni-transition/uni-transition.vue +0 -287
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="uni-title__box" :style="{ 'align-items': textAlign }">
|
|
3
|
+
<text class="uni-title__base" :class="['uni-' + type]" :style="{ color: color }">{{ title }}</text>
|
|
4
|
+
</view>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
/**
|
|
9
|
+
* Title 章节标题
|
|
10
|
+
* @description 章节标题,通常用于记录页面标题,使用当前组件,uni-app 如果开启统计,将会自动统计页面标题
|
|
11
|
+
* @tutorial https://ext.dcloud.net.cn/plugin?id=1066
|
|
12
|
+
* @property {String} type = [h1|h2|h3|h4|h5] 标题类型
|
|
13
|
+
* @value h1 一级标题
|
|
14
|
+
* @value h2 二级标题
|
|
15
|
+
* @value h3 三级标题
|
|
16
|
+
* @value h4 四级标题
|
|
17
|
+
* @value h5 五级标题
|
|
18
|
+
* @property {String} title 章节标题内容
|
|
19
|
+
* @property {String} align = [left|center|right] 对齐方式
|
|
20
|
+
* @value left 做对齐
|
|
21
|
+
* @value center 居中对齐
|
|
22
|
+
* @value right 右对齐
|
|
23
|
+
* @property {String} color 字体颜色
|
|
24
|
+
* @property {Boolean} stat = [true|false] 是否开启统计功能呢,如不填写type值,默认为开启,填写 type 属性,默认为关闭
|
|
25
|
+
*/
|
|
26
|
+
export default {
|
|
27
|
+
name: 'cvTitle',
|
|
28
|
+
props: {
|
|
29
|
+
type: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: ''
|
|
32
|
+
},
|
|
33
|
+
title: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: ''
|
|
36
|
+
},
|
|
37
|
+
align: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: 'left'
|
|
40
|
+
},
|
|
41
|
+
color: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: '#333333'
|
|
44
|
+
},
|
|
45
|
+
stat: {
|
|
46
|
+
type: [Boolean, String],
|
|
47
|
+
default: ''
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
data() {
|
|
51
|
+
return {};
|
|
52
|
+
},
|
|
53
|
+
computed: {
|
|
54
|
+
textAlign() {
|
|
55
|
+
let align = 'center';
|
|
56
|
+
switch (this.align) {
|
|
57
|
+
case 'left':
|
|
58
|
+
align = 'flex-start';
|
|
59
|
+
break;
|
|
60
|
+
case 'center':
|
|
61
|
+
align = 'center';
|
|
62
|
+
break;
|
|
63
|
+
case 'right':
|
|
64
|
+
align = 'flex-end';
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
return align;
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
watch: {
|
|
71
|
+
title(newVal) {
|
|
72
|
+
if (this.isOpenStat()) {
|
|
73
|
+
// 上报数据
|
|
74
|
+
if (uni.report) {
|
|
75
|
+
uni.report('title', this.title);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
mounted() {
|
|
81
|
+
if (this.isOpenStat()) {
|
|
82
|
+
// 上报数据
|
|
83
|
+
if (uni.report) {
|
|
84
|
+
uni.report('title', this.title);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
methods: {
|
|
89
|
+
isOpenStat() {
|
|
90
|
+
if (this.stat === '') {
|
|
91
|
+
this.isStat = false;
|
|
92
|
+
}
|
|
93
|
+
let stat_type = (typeof this.stat === 'boolean' && this.stat) || (typeof this.stat === 'string' && this.stat !== '');
|
|
94
|
+
if (this.type === '') {
|
|
95
|
+
this.isStat = true;
|
|
96
|
+
if (this.stat.toString() === 'false') {
|
|
97
|
+
this.isStat = false;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (this.type !== '') {
|
|
102
|
+
this.isStat = true;
|
|
103
|
+
if (stat_type) {
|
|
104
|
+
this.isStat = true;
|
|
105
|
+
} else {
|
|
106
|
+
this.isStat = false;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return this.isStat;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
</script>
|
|
114
|
+
|
|
115
|
+
<style scoped>
|
|
116
|
+
/* .uni-title {
|
|
117
|
+
|
|
118
|
+
} */
|
|
119
|
+
.uni-title__box {
|
|
120
|
+
/* #ifndef APP-NVUE */
|
|
121
|
+
display: flex;
|
|
122
|
+
/* #endif */
|
|
123
|
+
flex-direction: column;
|
|
124
|
+
align-items: flex-start;
|
|
125
|
+
justify-content: center;
|
|
126
|
+
padding: 8px 0;
|
|
127
|
+
flex: 1;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.uni-title__base {
|
|
131
|
+
font-size: 15px;
|
|
132
|
+
color: #333;
|
|
133
|
+
font-weight: 500;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.uni-h1 {
|
|
137
|
+
font-size: 20px;
|
|
138
|
+
color: #333;
|
|
139
|
+
font-weight: bold;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.uni-h2 {
|
|
143
|
+
font-size: 18px;
|
|
144
|
+
color: #333;
|
|
145
|
+
font-weight: bold;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.uni-h3 {
|
|
149
|
+
font-size: 16px;
|
|
150
|
+
color: #333;
|
|
151
|
+
font-weight: bold;
|
|
152
|
+
/* font-weight: 400; */
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.uni-h4 {
|
|
156
|
+
font-size: 14px;
|
|
157
|
+
color: #333;
|
|
158
|
+
font-weight: bold;
|
|
159
|
+
/* font-weight: 300; */
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.uni-h5 {
|
|
163
|
+
font-size: 12px;
|
|
164
|
+
color: #333;
|
|
165
|
+
font-weight: bold;
|
|
166
|
+
/* font-weight: 200; */
|
|
167
|
+
}
|
|
168
|
+
</style>
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- #ifdef H5 -->
|
|
3
|
+
<tr class="uni-table-tr">
|
|
4
|
+
<th v-if="selection === 'selection' && ishead" class="checkbox" :class="{ 'tr-table--border': border }">
|
|
5
|
+
<table-checkbox
|
|
6
|
+
:checked="checked"
|
|
7
|
+
:indeterminate="indeterminate"
|
|
8
|
+
:disabled="disabled"
|
|
9
|
+
@checkboxSelected="checkboxSelected"
|
|
10
|
+
></table-checkbox>
|
|
11
|
+
</th>
|
|
12
|
+
<slot></slot>
|
|
13
|
+
<!-- <uni-th class="th-fixed">123</uni-th> -->
|
|
14
|
+
</tr>
|
|
15
|
+
<!-- #endif -->
|
|
16
|
+
<!-- #ifndef H5 -->
|
|
17
|
+
<view class="uni-table-tr">
|
|
18
|
+
<view v-if="selection === 'selection'" class="checkbox" :class="{ 'tr-table--border': border }">
|
|
19
|
+
<table-checkbox
|
|
20
|
+
:checked="checked"
|
|
21
|
+
:indeterminate="indeterminate"
|
|
22
|
+
:disabled="disabled"
|
|
23
|
+
@checkboxSelected="checkboxSelected"
|
|
24
|
+
></table-checkbox>
|
|
25
|
+
</view>
|
|
26
|
+
<slot></slot>
|
|
27
|
+
</view>
|
|
28
|
+
<!-- #endif -->
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script>
|
|
32
|
+
import tableCheckbox from './table-checkbox.vue';
|
|
33
|
+
/**
|
|
34
|
+
* Tr 表格行组件
|
|
35
|
+
* @description 表格行组件 仅包含 th,td 组件
|
|
36
|
+
* @tutorial https://ext.dcloud.net.cn/plugin?id=
|
|
37
|
+
*/
|
|
38
|
+
export default {
|
|
39
|
+
name: 'cvTr',
|
|
40
|
+
components: {
|
|
41
|
+
tableCheckbox
|
|
42
|
+
},
|
|
43
|
+
props: {
|
|
44
|
+
disabled: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: false
|
|
47
|
+
},
|
|
48
|
+
keyValue: {
|
|
49
|
+
type: [String, Number],
|
|
50
|
+
default: ''
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
options: {
|
|
54
|
+
virtualHost: true
|
|
55
|
+
},
|
|
56
|
+
data() {
|
|
57
|
+
return {
|
|
58
|
+
value: false,
|
|
59
|
+
border: false,
|
|
60
|
+
selection: false,
|
|
61
|
+
widthThArr: [],
|
|
62
|
+
ishead: true,
|
|
63
|
+
checked: false,
|
|
64
|
+
indeterminate: false
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
created() {
|
|
68
|
+
this.root = this.getTable();
|
|
69
|
+
this.head = this.getTable('uniThead');
|
|
70
|
+
if (this.head) {
|
|
71
|
+
this.ishead = false;
|
|
72
|
+
this.head.init(this);
|
|
73
|
+
}
|
|
74
|
+
this.border = this.root.border;
|
|
75
|
+
this.selection = this.root.type;
|
|
76
|
+
this.root.trChildren.push(this);
|
|
77
|
+
const rowData = this.root.data.find((v) => v[this.root.rowKey] === this.keyValue);
|
|
78
|
+
if (rowData) {
|
|
79
|
+
this.rowData = rowData;
|
|
80
|
+
}
|
|
81
|
+
this.root.isNodata();
|
|
82
|
+
},
|
|
83
|
+
mounted() {
|
|
84
|
+
if (this.widthThArr.length > 0) {
|
|
85
|
+
const selectionWidth = this.selection === 'selection' ? 50 : 0;
|
|
86
|
+
this.root.minWidth = this.widthThArr.reduce((a, b) => Number(a) + Number(b)) + selectionWidth;
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
// #ifndef VUE3
|
|
90
|
+
destroyed() {
|
|
91
|
+
const index = this.root.trChildren.findIndex((i) => i === this);
|
|
92
|
+
this.root.trChildren.splice(index, 1);
|
|
93
|
+
this.root.isNodata();
|
|
94
|
+
},
|
|
95
|
+
// #endif
|
|
96
|
+
// #ifdef VUE3
|
|
97
|
+
unmounted() {
|
|
98
|
+
const index = this.root.trChildren.findIndex((i) => i === this);
|
|
99
|
+
this.root.trChildren.splice(index, 1);
|
|
100
|
+
this.root.isNodata();
|
|
101
|
+
},
|
|
102
|
+
// #endif
|
|
103
|
+
methods: {
|
|
104
|
+
minWidthUpdate(width) {
|
|
105
|
+
this.widthThArr.push(width);
|
|
106
|
+
},
|
|
107
|
+
// 选中
|
|
108
|
+
checkboxSelected(e) {
|
|
109
|
+
let rootData = this.root.data.find((v) => v[this.root.rowKey] === this.keyValue);
|
|
110
|
+
this.checked = e.checked;
|
|
111
|
+
this.root.check(rootData || this, e.checked, rootData ? this.keyValue : null);
|
|
112
|
+
},
|
|
113
|
+
change(e) {
|
|
114
|
+
this.root.trChildren.forEach((item) => {
|
|
115
|
+
if (item === this) {
|
|
116
|
+
this.root.check(this, e.detail.value.length > 0 ? true : false);
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
},
|
|
120
|
+
/**
|
|
121
|
+
* 获取父元素实例
|
|
122
|
+
*/
|
|
123
|
+
getTable(name = 'uniTable') {
|
|
124
|
+
let parent = this.$parent;
|
|
125
|
+
let parentName = parent.$options.name;
|
|
126
|
+
while (parentName !== name) {
|
|
127
|
+
parent = parent.$parent;
|
|
128
|
+
if (!parent) return false;
|
|
129
|
+
parentName = parent.$options.name;
|
|
130
|
+
}
|
|
131
|
+
return parent;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
</script>
|
|
136
|
+
|
|
137
|
+
<style scoped>
|
|
138
|
+
.uni-table-tr {
|
|
139
|
+
/* #ifndef APP-NVUE */
|
|
140
|
+
display: table-row;
|
|
141
|
+
transition: all 0.3s;
|
|
142
|
+
box-sizing: border-box;
|
|
143
|
+
/* #endif */
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.checkbox {
|
|
147
|
+
padding: 0 8px;
|
|
148
|
+
width: 26px;
|
|
149
|
+
padding-left: 12px;
|
|
150
|
+
/* #ifndef APP-NVUE */
|
|
151
|
+
display: table-cell;
|
|
152
|
+
vertical-align: middle;
|
|
153
|
+
/* #endif */
|
|
154
|
+
color: #333;
|
|
155
|
+
font-weight: 500;
|
|
156
|
+
border-bottom: 1px #ebeef5 solid;
|
|
157
|
+
font-size: 14px;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.tr-table--border {
|
|
161
|
+
border-right: 1px #ebeef5 solid;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* #ifndef APP-NVUE */
|
|
165
|
+
/* #endif */
|
|
166
|
+
</style>
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view v-if="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</view>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import { createAnimation } from './createAnimation';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Transition 过渡动画
|
|
12
|
+
* @description 简单过渡动画组件
|
|
13
|
+
* @tutorial https://ext.dcloud.net.cn/plugin?id=985
|
|
14
|
+
* @property {Boolean} show = [false|true] 控制组件显示或隐藏
|
|
15
|
+
* @property {Array|String} modeClass = [fade|slide-top|slide-right|slide-bottom|slide-left|zoom-in|zoom-out] 过渡动画类型
|
|
16
|
+
* @value fade 渐隐渐出过渡
|
|
17
|
+
* @value slide-top 由上至下过渡
|
|
18
|
+
* @value slide-right 由右至左过渡
|
|
19
|
+
* @value slide-bottom 由下至上过渡
|
|
20
|
+
* @value slide-left 由左至右过渡
|
|
21
|
+
* @value zoom-in 由小到大过渡
|
|
22
|
+
* @value zoom-out 由大到小过渡
|
|
23
|
+
* @property {Number} duration 过渡动画持续时间
|
|
24
|
+
* @property {Object} styles 组件样式,同 css 样式,注意带’-‘连接符的属性需要使用小驼峰写法如:`backgroundColor:red`
|
|
25
|
+
*/
|
|
26
|
+
export default {
|
|
27
|
+
name: 'cvTransition',
|
|
28
|
+
emits: ['click', 'change'],
|
|
29
|
+
props: {
|
|
30
|
+
show: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: false
|
|
33
|
+
},
|
|
34
|
+
modeClass: {
|
|
35
|
+
type: [Array, String],
|
|
36
|
+
default() {
|
|
37
|
+
return 'fade';
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
duration: {
|
|
41
|
+
type: Number,
|
|
42
|
+
default: 300
|
|
43
|
+
},
|
|
44
|
+
styles: {
|
|
45
|
+
type: Object,
|
|
46
|
+
default() {
|
|
47
|
+
return {};
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
customClass: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: ''
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
data() {
|
|
56
|
+
return {
|
|
57
|
+
isShow: false,
|
|
58
|
+
transform: '',
|
|
59
|
+
opacity: 1,
|
|
60
|
+
animationData: {},
|
|
61
|
+
durationTime: 300,
|
|
62
|
+
config: {}
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
watch: {
|
|
66
|
+
show: {
|
|
67
|
+
handler(newVal) {
|
|
68
|
+
if (newVal) {
|
|
69
|
+
this.open();
|
|
70
|
+
} else {
|
|
71
|
+
// 避免上来就执行 close,导致动画错乱
|
|
72
|
+
if (this.isShow) {
|
|
73
|
+
this.close();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
immediate: true
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
computed: {
|
|
81
|
+
// 生成样式数据
|
|
82
|
+
stylesObject() {
|
|
83
|
+
let styles = {
|
|
84
|
+
...this.styles,
|
|
85
|
+
'transition-duration': this.duration / 1000 + 's'
|
|
86
|
+
};
|
|
87
|
+
let transform = '';
|
|
88
|
+
for (let i in styles) {
|
|
89
|
+
let line = this.toLine(i);
|
|
90
|
+
transform += line + ':' + styles[i] + ';';
|
|
91
|
+
}
|
|
92
|
+
return transform;
|
|
93
|
+
},
|
|
94
|
+
// 初始化动画条件
|
|
95
|
+
transformStyles() {
|
|
96
|
+
return 'transform:' + this.transform + ';' + 'opacity:' + this.opacity + ';' + this.stylesObject;
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
created() {
|
|
100
|
+
// 动画默认配置
|
|
101
|
+
this.config = {
|
|
102
|
+
duration: this.duration,
|
|
103
|
+
timingFunction: 'ease',
|
|
104
|
+
transformOrigin: '50% 50%',
|
|
105
|
+
delay: 0
|
|
106
|
+
};
|
|
107
|
+
this.durationTime = this.duration;
|
|
108
|
+
},
|
|
109
|
+
methods: {
|
|
110
|
+
/**
|
|
111
|
+
* ref 触发 初始化动画
|
|
112
|
+
*/
|
|
113
|
+
init(obj = {}) {
|
|
114
|
+
if (obj.duration) {
|
|
115
|
+
this.durationTime = obj.duration;
|
|
116
|
+
}
|
|
117
|
+
this.animation = createAnimation(Object.assign(this.config, obj));
|
|
118
|
+
},
|
|
119
|
+
/**
|
|
120
|
+
* 点击组件触发回调
|
|
121
|
+
*/
|
|
122
|
+
onClick() {
|
|
123
|
+
this.$emit('click', {
|
|
124
|
+
detail: this.isShow
|
|
125
|
+
});
|
|
126
|
+
},
|
|
127
|
+
/**
|
|
128
|
+
* ref 触发 动画分组
|
|
129
|
+
* @param {Object} obj
|
|
130
|
+
*/
|
|
131
|
+
step(obj, config = {}) {
|
|
132
|
+
if (!this.animation) return;
|
|
133
|
+
for (let i in obj) {
|
|
134
|
+
try {
|
|
135
|
+
if (typeof obj[i] === 'object') {
|
|
136
|
+
this.animation[i](...obj[i]);
|
|
137
|
+
} else {
|
|
138
|
+
this.animation[i](obj[i]);
|
|
139
|
+
}
|
|
140
|
+
} catch (e) {
|
|
141
|
+
console.error(`方法 ${i} 不存在`);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
this.animation.step(config);
|
|
145
|
+
return this;
|
|
146
|
+
},
|
|
147
|
+
/**
|
|
148
|
+
* ref 触发 执行动画
|
|
149
|
+
*/
|
|
150
|
+
run(fn) {
|
|
151
|
+
if (!this.animation) return;
|
|
152
|
+
this.animation.run(fn);
|
|
153
|
+
},
|
|
154
|
+
// 开始过度动画
|
|
155
|
+
open() {
|
|
156
|
+
clearTimeout(this.timer);
|
|
157
|
+
this.transform = '';
|
|
158
|
+
this.isShow = true;
|
|
159
|
+
let { opacity, transform } = this.styleInit(false);
|
|
160
|
+
if (typeof opacity !== 'undefined') {
|
|
161
|
+
this.opacity = opacity;
|
|
162
|
+
}
|
|
163
|
+
this.transform = transform;
|
|
164
|
+
// 确保动态样式已经生效后,执行动画,如果不加 nextTick ,会导致 wx 动画执行异常
|
|
165
|
+
this.$nextTick(() => {
|
|
166
|
+
// TODO 定时器保证动画完全执行,目前有些问题,后面会取消定时器
|
|
167
|
+
this.timer = setTimeout(() => {
|
|
168
|
+
this.animation = createAnimation(this.config, this);
|
|
169
|
+
this.tranfromInit(false).step();
|
|
170
|
+
this.animation.run();
|
|
171
|
+
this.$emit('change', {
|
|
172
|
+
detail: this.isShow
|
|
173
|
+
});
|
|
174
|
+
}, 20);
|
|
175
|
+
});
|
|
176
|
+
},
|
|
177
|
+
// 关闭过度动画
|
|
178
|
+
close(type) {
|
|
179
|
+
if (!this.animation) return;
|
|
180
|
+
this.tranfromInit(true)
|
|
181
|
+
.step()
|
|
182
|
+
.run(() => {
|
|
183
|
+
this.isShow = false;
|
|
184
|
+
this.animationData = null;
|
|
185
|
+
this.animation = null;
|
|
186
|
+
let { opacity, transform } = this.styleInit(false);
|
|
187
|
+
this.opacity = opacity || 1;
|
|
188
|
+
this.transform = transform;
|
|
189
|
+
this.$emit('change', {
|
|
190
|
+
detail: this.isShow
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
},
|
|
194
|
+
// 处理动画开始前的默认样式
|
|
195
|
+
styleInit(type) {
|
|
196
|
+
let styles = {
|
|
197
|
+
transform: ''
|
|
198
|
+
};
|
|
199
|
+
let buildStyle = (type, mode) => {
|
|
200
|
+
if (mode === 'fade') {
|
|
201
|
+
styles.opacity = this.animationType(type)[mode];
|
|
202
|
+
} else {
|
|
203
|
+
styles.transform += this.animationType(type)[mode] + ' ';
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
if (typeof this.modeClass === 'string') {
|
|
207
|
+
buildStyle(type, this.modeClass);
|
|
208
|
+
} else {
|
|
209
|
+
this.modeClass.forEach((mode) => {
|
|
210
|
+
buildStyle(type, mode);
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
return styles;
|
|
214
|
+
},
|
|
215
|
+
// 处理内置组合动画
|
|
216
|
+
tranfromInit(type) {
|
|
217
|
+
let buildTranfrom = (type, mode) => {
|
|
218
|
+
let aniNum = null;
|
|
219
|
+
if (mode === 'fade') {
|
|
220
|
+
aniNum = type ? 0 : 1;
|
|
221
|
+
} else {
|
|
222
|
+
aniNum = type ? '-100%' : '0';
|
|
223
|
+
if (mode === 'zoom-in') {
|
|
224
|
+
aniNum = type ? 0.8 : 1;
|
|
225
|
+
}
|
|
226
|
+
if (mode === 'zoom-out') {
|
|
227
|
+
aniNum = type ? 1.2 : 1;
|
|
228
|
+
}
|
|
229
|
+
if (mode === 'slide-right') {
|
|
230
|
+
aniNum = type ? '100%' : '0';
|
|
231
|
+
}
|
|
232
|
+
if (mode === 'slide-bottom') {
|
|
233
|
+
aniNum = type ? '100%' : '0';
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
this.animation[this.animationMode()[mode]](aniNum);
|
|
237
|
+
};
|
|
238
|
+
if (typeof this.modeClass === 'string') {
|
|
239
|
+
buildTranfrom(type, this.modeClass);
|
|
240
|
+
} else {
|
|
241
|
+
this.modeClass.forEach((mode) => {
|
|
242
|
+
buildTranfrom(type, mode);
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
return this.animation;
|
|
247
|
+
},
|
|
248
|
+
animationType(type) {
|
|
249
|
+
return {
|
|
250
|
+
fade: type ? 1 : 0,
|
|
251
|
+
'slide-top': `translateY(${type ? '0' : '-100%'})`,
|
|
252
|
+
'slide-right': `translateX(${type ? '0' : '100%'})`,
|
|
253
|
+
'slide-bottom': `translateY(${type ? '0' : '100%'})`,
|
|
254
|
+
'slide-left': `translateX(${type ? '0' : '-100%'})`,
|
|
255
|
+
'zoom-in': `scaleX(${type ? 1 : 0.8}) scaleY(${type ? 1 : 0.8})`,
|
|
256
|
+
'zoom-out': `scaleX(${type ? 1 : 1.2}) scaleY(${type ? 1 : 1.2})`
|
|
257
|
+
};
|
|
258
|
+
},
|
|
259
|
+
// 内置动画类型与实际动画对应字典
|
|
260
|
+
animationMode() {
|
|
261
|
+
return {
|
|
262
|
+
fade: 'opacity',
|
|
263
|
+
'slide-top': 'translateY',
|
|
264
|
+
'slide-right': 'translateX',
|
|
265
|
+
'slide-bottom': 'translateY',
|
|
266
|
+
'slide-left': 'translateX',
|
|
267
|
+
'zoom-in': 'scale',
|
|
268
|
+
'zoom-out': 'scale'
|
|
269
|
+
};
|
|
270
|
+
},
|
|
271
|
+
// 驼峰转中横线
|
|
272
|
+
toLine(name) {
|
|
273
|
+
return name.replace(/([A-Z])/g, '-$1').toLowerCase();
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
</script>
|
|
278
|
+
|
|
279
|
+
<style scoped></style>
|
|
@@ -39,6 +39,10 @@ export default {
|
|
|
39
39
|
src: {
|
|
40
40
|
type: String,
|
|
41
41
|
default: ''
|
|
42
|
+
},
|
|
43
|
+
upFunc: {
|
|
44
|
+
type: [Function],
|
|
45
|
+
default: () => {}
|
|
42
46
|
}
|
|
43
47
|
},
|
|
44
48
|
data() {
|
|
@@ -74,28 +78,26 @@ export default {
|
|
|
74
78
|
}
|
|
75
79
|
});
|
|
76
80
|
},
|
|
77
|
-
uploadAvatar
|
|
78
|
-
this
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
});
|
|
81
|
+
uploadAvatar(tempFilePaths) {
|
|
82
|
+
this.upFunc('UC_PERSONAL_AVATAR', {
|
|
83
|
+
filePath: tempFilePaths,
|
|
84
|
+
name: 'xcx_pper_avatar',
|
|
85
|
+
formData: {
|
|
86
|
+
postType: 'update',
|
|
87
|
+
file_name: 'xcx_pper_avatar'
|
|
88
|
+
}
|
|
89
|
+
}).then((resData) => {
|
|
90
|
+
if (resData.status == 200) {
|
|
91
|
+
uni.showToast({
|
|
92
|
+
title: '修改成功',
|
|
93
|
+
icon: 'success,',
|
|
94
|
+
duration: 1500
|
|
95
|
+
});
|
|
96
|
+
this.localVal = resData.save_url;
|
|
97
|
+
this.localSrc = resData.img_cdn;
|
|
98
|
+
this.$emit('input', this.localVal);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
99
101
|
}
|
|
100
102
|
}
|
|
101
103
|
};
|