@10yun/cv-mobile-ui 0.4.6 → 0.4.8
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/MessageBox.js +87 -0
- package/plugins/MessageTip.js +56 -0
- package/plugins/jumps.js +0 -7
- package/plugins/request.js +7 -5
- package/plugins/storage.js +89 -80
- package/plugins/storage2.js +181 -0
- package/plugins/uni-upgrade.js +19 -10
- package/plugins/uni-upgrade3.js +5 -5
- package/ui-cv/cv-button/cv-button.vue +5 -12
- package/ui-cv/cv-checkbox-group/cv-checkbox-group.vue +9 -13
- package/ui-cv/cv-lists-swiper/cv-lists-swiper.vue +0 -2
- package/ui-cv/cv-picker1/cv-picker1.vue +2 -17
- package/ui-cv/cv-picker2/cv-picker2.vue +2 -17
- package/ui-cv/cv-picker3/cv-picker3.vue +2 -17
- package/ui-cv/cv-radio-group/cv-radio-group.vue +30 -42
- package/ui-cv/cv-tab-lists/cv-tab-lists.vue +1 -1
- package/ui-uni/uni-drawer/keypress.js +14 -14
- package/ui-uni/uni-drawer/uni-drawer.vue +172 -165
- package/ui-uni/uni-popup/keypress.js +14 -14
- package/ui-uni/uni-popup/popup.js +23 -26
- package/ui-uni/uni-popup/uni-popup.vue +411 -394
- package/plugins/message.js +0 -76
- package/plugins/uni-im.js +0 -31
- package/ui-cv/cv-info/cv-info.vue +0 -55
package/plugins/message.js
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
class MessageClass {
|
|
2
|
-
/**
|
|
3
|
-
* @author xiesuhang
|
|
4
|
-
* @param {string} title 标题 不要标题传入空
|
|
5
|
-
* @param {string} 内容 是否显示透明蒙层,防止触摸穿透,默认:false
|
|
6
|
-
* @param {Boolean} showCancel 是否显示取消按钮
|
|
7
|
-
* @param {string} cancelText 取消按钮文字
|
|
8
|
-
* */
|
|
9
|
-
static confirm(content, title, showCancel, cancelText) {
|
|
10
|
-
return new Promise((res, rej) => {
|
|
11
|
-
uni.showModal({
|
|
12
|
-
title: title || '提示',
|
|
13
|
-
content: String(content) || '??',
|
|
14
|
-
confirmText: '确定',
|
|
15
|
-
showCancel: showCancel || false,
|
|
16
|
-
cancelText: cancelText || '取消',
|
|
17
|
-
success: function (modalRes) {
|
|
18
|
-
if (modalRes.confirm) {
|
|
19
|
-
res(modalRes);
|
|
20
|
-
} else if (modalRes.cancel) {
|
|
21
|
-
console.log('用户点击了取消');
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
fail: function (err) {
|
|
25
|
-
rej(err);
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* 显示提示框
|
|
32
|
-
* @author xiesuhang
|
|
33
|
-
* @param {string} title 标题
|
|
34
|
-
* @param {Boolean} mask 是否显示透明蒙层,防止触摸穿透,默认:false
|
|
35
|
-
**/
|
|
36
|
-
static loading(title, mask) {
|
|
37
|
-
return uni.showLoading({
|
|
38
|
-
title: title || '加载中...', //正在加载中
|
|
39
|
-
mask: mask || true
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* 显示提示框,2s消失的提示框
|
|
44
|
-
* @author xiesuhang
|
|
45
|
-
* @param {string} title 标题
|
|
46
|
-
* @param {string} duration 显示时间
|
|
47
|
-
* @param {string} icon //弹框类型 icon 值说明 success loading none
|
|
48
|
-
*
|
|
49
|
-
**/
|
|
50
|
-
static show(title, duration, icon) {
|
|
51
|
-
uni.showToast({
|
|
52
|
-
title: title || '提示',
|
|
53
|
-
duration: duration || 1500,
|
|
54
|
-
icon: icon || 'none',
|
|
55
|
-
mask: true
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
// 显示繁忙提示
|
|
59
|
-
static loadtime(title, duration = 10000) {
|
|
60
|
-
this.show(title, duration, 'loading');
|
|
61
|
-
}
|
|
62
|
-
// 显示成功提示
|
|
63
|
-
static success(title, duration) {
|
|
64
|
-
this.show(title, duration, 'success');
|
|
65
|
-
}
|
|
66
|
-
// 显示失败提示
|
|
67
|
-
static error(title, content) {
|
|
68
|
-
uni.hideToast();
|
|
69
|
-
uni.showModal({
|
|
70
|
-
title,
|
|
71
|
-
content: JSON.stringify(content),
|
|
72
|
-
showCancel: false
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
export default MessageClass;
|
package/plugins/uni-im.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
const imFunc = {
|
|
2
|
-
/**
|
|
3
|
-
* 接收端口消息 //获取推送数据
|
|
4
|
-
*/
|
|
5
|
-
getMsgMessage: function (showIndex) {
|
|
6
|
-
showIndex = showIndex || 4;
|
|
7
|
-
// 账户信息存在时执行
|
|
8
|
-
let has_login = _this.$store.state.storeUser.has_login;
|
|
9
|
-
if (has_login) {
|
|
10
|
-
reqUtils
|
|
11
|
-
.requestApi('GET', 'ucenter/message/get_message_count', {
|
|
12
|
-
page: 1
|
|
13
|
-
})
|
|
14
|
-
.then((successRes) => {
|
|
15
|
-
var count = successRes.data.count;
|
|
16
|
-
if (count > 0) {
|
|
17
|
-
uni.setTabBarBadge({
|
|
18
|
-
index: showIndex,
|
|
19
|
-
text: String(count)
|
|
20
|
-
});
|
|
21
|
-
return count;
|
|
22
|
-
} else {
|
|
23
|
-
uni.removeTabBarBadge({
|
|
24
|
-
index: showIndex
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
module.exports = imFunc;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<view class="cv-info-area" ref="onEmpty" v-bind:style="cvInfoArea">
|
|
3
|
-
<view class="cv-info-item">
|
|
4
|
-
<text>{{ info }}</text>
|
|
5
|
-
</view>
|
|
6
|
-
</view>
|
|
7
|
-
</template>
|
|
8
|
-
|
|
9
|
-
<script>
|
|
10
|
-
export default {
|
|
11
|
-
name: 'cvInfo',
|
|
12
|
-
props: {
|
|
13
|
-
info: {
|
|
14
|
-
type: [Number, String],
|
|
15
|
-
default: ''
|
|
16
|
-
},
|
|
17
|
-
infoAlign: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: 'right'
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
data() {
|
|
23
|
-
return {
|
|
24
|
-
cvInfoArea: {}
|
|
25
|
-
};
|
|
26
|
-
},
|
|
27
|
-
watch: {
|
|
28
|
-
value(newVal) {}
|
|
29
|
-
},
|
|
30
|
-
created() {
|
|
31
|
-
this._dealStyle();
|
|
32
|
-
},
|
|
33
|
-
methods: {
|
|
34
|
-
_dealStyle() {
|
|
35
|
-
this.cvInfoArea = {
|
|
36
|
-
textAlign: this.infoAlign
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
</script>
|
|
42
|
-
|
|
43
|
-
<style>
|
|
44
|
-
.cv-info-area {
|
|
45
|
-
margin-top: 8px;
|
|
46
|
-
line-height: 1.5em;
|
|
47
|
-
text-align: right;
|
|
48
|
-
}
|
|
49
|
-
.cv-info-item {
|
|
50
|
-
line-height: 1.5em;
|
|
51
|
-
font-size: 14px;
|
|
52
|
-
display: inline-block;
|
|
53
|
-
text-align: left;
|
|
54
|
-
}
|
|
55
|
-
</style>
|