@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
|
@@ -1,412 +1,429 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
<view
|
|
3
|
+
v-if="showPopup"
|
|
4
|
+
class="uni-popup"
|
|
5
|
+
:class="[popupstyle, isDesktop ? 'fixforpc-z-index' : '']"
|
|
6
|
+
@touchmove.stop.prevent="clear"
|
|
7
|
+
>
|
|
8
|
+
<view @touchstart="touchstart">
|
|
9
|
+
<uni-transition
|
|
10
|
+
key="1"
|
|
11
|
+
v-if="maskShow"
|
|
12
|
+
name="mask"
|
|
13
|
+
mode-class="fade"
|
|
14
|
+
:styles="maskClass"
|
|
15
|
+
:duration="duration"
|
|
16
|
+
:show="showTrans"
|
|
17
|
+
@click="onTap"
|
|
18
|
+
/>
|
|
19
|
+
<uni-transition
|
|
20
|
+
key="2"
|
|
21
|
+
:mode-class="ani"
|
|
22
|
+
name="content"
|
|
23
|
+
:styles="transClass"
|
|
24
|
+
:duration="duration"
|
|
25
|
+
:show="showTrans"
|
|
26
|
+
@click="onTap"
|
|
27
|
+
>
|
|
28
|
+
<view class="uni-popup__wrapper" :style="{ backgroundColor: bg }" :class="[popupstyle]" @click="clear">
|
|
29
|
+
<slot />
|
|
30
|
+
</view>
|
|
31
|
+
</uni-transition>
|
|
32
|
+
</view>
|
|
33
|
+
<!-- #ifdef H5 -->
|
|
34
|
+
<keypress v-if="maskShow" @esc="onTap" />
|
|
35
|
+
<!-- #endif -->
|
|
36
|
+
</view>
|
|
15
37
|
</template>
|
|
16
38
|
|
|
17
39
|
<script>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
40
|
+
// #ifdef H5
|
|
41
|
+
import keypress from './keypress.js';
|
|
42
|
+
// #endif
|
|
21
43
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
44
|
+
/**
|
|
45
|
+
* PopUp 弹出层
|
|
46
|
+
* @description 弹出层组件,为了解决遮罩弹层的问题
|
|
47
|
+
* @tutorial https://ext.dcloud.net.cn/plugin?id=329
|
|
48
|
+
* @property {String} type = [top|center|bottom|left|right|message|dialog|share] 弹出方式
|
|
49
|
+
* @value top 顶部弹出
|
|
50
|
+
* @value center 中间弹出
|
|
51
|
+
* @value bottom 底部弹出
|
|
52
|
+
* @value left 左侧弹出
|
|
53
|
+
* @value right 右侧弹出
|
|
54
|
+
* @value message 消息提示
|
|
55
|
+
* @value dialog 对话框
|
|
56
|
+
* @value share 底部分享示例
|
|
57
|
+
* @property {Boolean} animation = [ture|false] 是否开启动画
|
|
58
|
+
* @property {Boolean} maskClick = [ture|false] 蒙版点击是否关闭弹窗
|
|
59
|
+
* @property {String} backgroundColor 主窗口背景色
|
|
60
|
+
* @property {Boolean} safeArea 是否适配底部安全区
|
|
61
|
+
* @event {Function} change 打开关闭弹窗触发,e={show: false}
|
|
62
|
+
*/
|
|
41
63
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
64
|
+
export default {
|
|
65
|
+
name: 'uniPopup',
|
|
66
|
+
components: {
|
|
67
|
+
// #ifdef H5
|
|
68
|
+
keypress
|
|
69
|
+
// #endif
|
|
70
|
+
},
|
|
71
|
+
emits: ['change', 'maskClick'],
|
|
72
|
+
props: {
|
|
73
|
+
// 开启动画
|
|
74
|
+
animation: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: true
|
|
77
|
+
},
|
|
78
|
+
// 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层
|
|
79
|
+
// message: 消息提示 ; dialog : 对话框
|
|
80
|
+
type: {
|
|
81
|
+
type: String,
|
|
82
|
+
default: 'center'
|
|
83
|
+
},
|
|
84
|
+
// maskClick
|
|
85
|
+
maskClick: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
default: true
|
|
88
|
+
},
|
|
89
|
+
backgroundColor: {
|
|
90
|
+
type: String,
|
|
91
|
+
default: 'none'
|
|
92
|
+
},
|
|
93
|
+
safeArea: {
|
|
94
|
+
type: Boolean,
|
|
95
|
+
default: true
|
|
96
|
+
}
|
|
97
|
+
},
|
|
76
98
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
// #ifndef APP-NVUE
|
|
206
|
-
e.stopPropagation()
|
|
207
|
-
// #endif
|
|
208
|
-
this.clearPropagation = true
|
|
209
|
-
},
|
|
99
|
+
watch: {
|
|
100
|
+
/**
|
|
101
|
+
* 监听type类型
|
|
102
|
+
*/
|
|
103
|
+
type: {
|
|
104
|
+
handler: function (type) {
|
|
105
|
+
if (!this.config[type]) return;
|
|
106
|
+
this[this.config[type]](true);
|
|
107
|
+
},
|
|
108
|
+
immediate: true
|
|
109
|
+
},
|
|
110
|
+
isDesktop: {
|
|
111
|
+
handler: function (newVal) {
|
|
112
|
+
if (!this.config[newVal]) return;
|
|
113
|
+
this[this.config[this.type]](true);
|
|
114
|
+
},
|
|
115
|
+
immediate: true
|
|
116
|
+
},
|
|
117
|
+
/**
|
|
118
|
+
* 监听遮罩是否可点击
|
|
119
|
+
* @param {Object} val
|
|
120
|
+
*/
|
|
121
|
+
maskClick: {
|
|
122
|
+
handler: function (val) {
|
|
123
|
+
this.mkclick = val;
|
|
124
|
+
},
|
|
125
|
+
immediate: true
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
data() {
|
|
129
|
+
return {
|
|
130
|
+
duration: 300,
|
|
131
|
+
ani: [],
|
|
132
|
+
showPopup: false,
|
|
133
|
+
showTrans: false,
|
|
134
|
+
popupWidth: 0,
|
|
135
|
+
popupHeight: 0,
|
|
136
|
+
config: {
|
|
137
|
+
top: 'top',
|
|
138
|
+
bottom: 'bottom',
|
|
139
|
+
center: 'center',
|
|
140
|
+
left: 'left',
|
|
141
|
+
right: 'right',
|
|
142
|
+
message: 'top',
|
|
143
|
+
dialog: 'center',
|
|
144
|
+
share: 'bottom'
|
|
145
|
+
},
|
|
146
|
+
maskClass: {
|
|
147
|
+
position: 'fixed',
|
|
148
|
+
bottom: 0,
|
|
149
|
+
top: 0,
|
|
150
|
+
left: 0,
|
|
151
|
+
right: 0,
|
|
152
|
+
backgroundColor: 'rgba(0, 0, 0, 0.4)'
|
|
153
|
+
},
|
|
154
|
+
transClass: {
|
|
155
|
+
position: 'fixed',
|
|
156
|
+
left: 0,
|
|
157
|
+
right: 0
|
|
158
|
+
},
|
|
159
|
+
maskShow: true,
|
|
160
|
+
mkclick: true,
|
|
161
|
+
popupstyle: this.isDesktop ? 'fixforpc-top' : 'top'
|
|
162
|
+
};
|
|
163
|
+
},
|
|
164
|
+
computed: {
|
|
165
|
+
isDesktop() {
|
|
166
|
+
return this.popupWidth >= 500 && this.popupHeight >= 500;
|
|
167
|
+
},
|
|
168
|
+
bg() {
|
|
169
|
+
if (this.backgroundColor === '' || this.backgroundColor === 'none') {
|
|
170
|
+
return 'transparent';
|
|
171
|
+
}
|
|
172
|
+
return this.backgroundColor;
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
mounted() {
|
|
176
|
+
const fixSize = () => {
|
|
177
|
+
const { windowWidth, windowHeight, windowTop, safeAreaInsets } = uni.getSystemInfoSync();
|
|
178
|
+
this.popupWidth = windowWidth;
|
|
179
|
+
this.popupHeight = windowHeight + windowTop;
|
|
180
|
+
// 是否适配底部安全区
|
|
181
|
+
if (this.safeArea) {
|
|
182
|
+
this.safeAreaInsets = safeAreaInsets;
|
|
183
|
+
} else {
|
|
184
|
+
this.safeAreaInsets = 0;
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
fixSize();
|
|
188
|
+
// #ifdef H5
|
|
189
|
+
// window.addEventListener('resize', fixSize)
|
|
190
|
+
// this.$once('hook:beforeDestroy', () => {
|
|
191
|
+
// window.removeEventListener('resize', fixSize)
|
|
192
|
+
// })
|
|
193
|
+
// #endif
|
|
194
|
+
},
|
|
195
|
+
created() {
|
|
196
|
+
this.mkclick = this.maskClick;
|
|
197
|
+
if (this.animation) {
|
|
198
|
+
this.duration = 300;
|
|
199
|
+
} else {
|
|
200
|
+
this.duration = 0;
|
|
201
|
+
}
|
|
202
|
+
// TODO 处理 message 组件生命周期异常的问题
|
|
203
|
+
this.messageChild = null;
|
|
204
|
+
// TODO 解决头条冒泡的问题
|
|
205
|
+
this.clearPropagation = false;
|
|
206
|
+
},
|
|
207
|
+
methods: {
|
|
208
|
+
/**
|
|
209
|
+
* 公用方法,不显示遮罩层
|
|
210
|
+
*/
|
|
211
|
+
closeMask() {
|
|
212
|
+
this.maskShow = false;
|
|
213
|
+
},
|
|
214
|
+
/**
|
|
215
|
+
* 公用方法,遮罩层禁止点击
|
|
216
|
+
*/
|
|
217
|
+
disableMask() {
|
|
218
|
+
this.mkclick = false;
|
|
219
|
+
},
|
|
220
|
+
// TODO nvue 取消冒泡
|
|
221
|
+
clear(e) {
|
|
222
|
+
// #ifndef APP-NVUE
|
|
223
|
+
e.stopPropagation();
|
|
224
|
+
// #endif
|
|
225
|
+
this.clearPropagation = true;
|
|
226
|
+
},
|
|
210
227
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
228
|
+
open(direction) {
|
|
229
|
+
let innerType = ['top', 'center', 'bottom', 'left', 'right', 'message', 'dialog', 'share'];
|
|
230
|
+
if (!(direction && innerType.indexOf(direction) !== -1)) {
|
|
231
|
+
direction = this.type;
|
|
232
|
+
}
|
|
233
|
+
if (!this.config[direction]) {
|
|
234
|
+
console.error('缺少类型:', direction);
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
this[this.config[direction]]();
|
|
238
|
+
this.$emit('change', {
|
|
239
|
+
show: true,
|
|
240
|
+
type: direction
|
|
241
|
+
});
|
|
242
|
+
},
|
|
243
|
+
close(type) {
|
|
244
|
+
this.showTrans = false;
|
|
245
|
+
this.$emit('change', {
|
|
246
|
+
show: false,
|
|
247
|
+
type: this.type
|
|
248
|
+
});
|
|
249
|
+
clearTimeout(this.timer);
|
|
250
|
+
// // 自定义关闭事件
|
|
251
|
+
// this.customOpen && this.customClose()
|
|
252
|
+
this.timer = setTimeout(() => {
|
|
253
|
+
this.showPopup = false;
|
|
254
|
+
}, 300);
|
|
255
|
+
},
|
|
256
|
+
// TODO 处理冒泡事件,头条的冒泡事件有问题 ,先这样兼容
|
|
257
|
+
touchstart() {
|
|
258
|
+
this.clearPropagation = false;
|
|
259
|
+
},
|
|
243
260
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
261
|
+
onTap() {
|
|
262
|
+
if (this.clearPropagation) {
|
|
263
|
+
// fix by mehaotian 兼容 nvue
|
|
264
|
+
this.clearPropagation = false;
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
this.$emit('maskClick');
|
|
268
|
+
if (!this.mkclick) return;
|
|
269
|
+
this.close();
|
|
270
|
+
},
|
|
271
|
+
/**
|
|
272
|
+
* 顶部弹出样式处理
|
|
273
|
+
*/
|
|
274
|
+
top(type) {
|
|
275
|
+
this.popupstyle = this.isDesktop ? 'fixforpc-top' : 'top';
|
|
276
|
+
this.ani = ['slide-top'];
|
|
277
|
+
this.transClass = {
|
|
278
|
+
position: 'fixed',
|
|
279
|
+
left: 0,
|
|
280
|
+
right: 0,
|
|
281
|
+
backgroundColor: this.bg
|
|
282
|
+
};
|
|
283
|
+
// TODO 兼容 type 属性 ,后续会废弃
|
|
284
|
+
if (type) return;
|
|
285
|
+
this.showPopup = true;
|
|
286
|
+
this.showTrans = true;
|
|
287
|
+
this.$nextTick(() => {
|
|
288
|
+
if (this.messageChild && this.type === 'message') {
|
|
289
|
+
this.messageChild.timerClose();
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
},
|
|
293
|
+
/**
|
|
294
|
+
* 底部弹出样式处理
|
|
295
|
+
*/
|
|
296
|
+
bottom(type) {
|
|
297
|
+
this.popupstyle = 'bottom';
|
|
298
|
+
this.ani = ['slide-bottom'];
|
|
282
299
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
300
|
+
this.transClass = {
|
|
301
|
+
position: 'fixed',
|
|
302
|
+
left: 0,
|
|
303
|
+
right: 0,
|
|
304
|
+
bottom: 0,
|
|
305
|
+
paddingBottom: (this.safeAreaInsets && this.safeAreaInsets.bottom) || 0,
|
|
306
|
+
backgroundColor: this.bg
|
|
307
|
+
};
|
|
308
|
+
// TODO 兼容 type 属性 ,后续会废弃
|
|
309
|
+
if (type) return;
|
|
310
|
+
this.showPopup = true;
|
|
311
|
+
this.showTrans = true;
|
|
312
|
+
},
|
|
313
|
+
/**
|
|
314
|
+
* 中间弹出样式处理
|
|
315
|
+
*/
|
|
316
|
+
center(type) {
|
|
317
|
+
this.popupstyle = 'center';
|
|
318
|
+
this.ani = ['zoom-out', 'fade'];
|
|
319
|
+
this.transClass = {
|
|
320
|
+
position: 'fixed',
|
|
321
|
+
/* #ifndef APP-NVUE */
|
|
322
|
+
display: 'flex',
|
|
323
|
+
flexDirection: 'column',
|
|
324
|
+
/* #endif */
|
|
325
|
+
bottom: 0,
|
|
326
|
+
left: 0,
|
|
327
|
+
right: 0,
|
|
328
|
+
top: 0,
|
|
329
|
+
justifyContent: 'center',
|
|
330
|
+
alignItems: 'center'
|
|
331
|
+
};
|
|
332
|
+
// TODO 兼容 type 属性 ,后续会废弃
|
|
333
|
+
if (type) return;
|
|
334
|
+
this.showPopup = true;
|
|
335
|
+
this.showTrans = true;
|
|
336
|
+
},
|
|
337
|
+
left(type) {
|
|
338
|
+
this.popupstyle = 'left';
|
|
339
|
+
this.ani = ['slide-left'];
|
|
340
|
+
this.transClass = {
|
|
341
|
+
position: 'fixed',
|
|
342
|
+
left: 0,
|
|
343
|
+
bottom: 0,
|
|
344
|
+
top: 0,
|
|
345
|
+
backgroundColor: this.bg,
|
|
346
|
+
/* #ifndef APP-NVUE */
|
|
347
|
+
display: 'flex',
|
|
348
|
+
flexDirection: 'column'
|
|
349
|
+
/* #endif */
|
|
350
|
+
};
|
|
351
|
+
// TODO 兼容 type 属性 ,后续会废弃
|
|
352
|
+
if (type) return;
|
|
353
|
+
this.showPopup = true;
|
|
354
|
+
this.showTrans = true;
|
|
355
|
+
},
|
|
356
|
+
right(type) {
|
|
357
|
+
this.popupstyle = 'right';
|
|
358
|
+
this.ani = ['slide-right'];
|
|
359
|
+
this.transClass = {
|
|
360
|
+
position: 'fixed',
|
|
361
|
+
bottom: 0,
|
|
362
|
+
right: 0,
|
|
363
|
+
top: 0,
|
|
364
|
+
backgroundColor: this.bg,
|
|
365
|
+
/* #ifndef APP-NVUE */
|
|
366
|
+
display: 'flex',
|
|
367
|
+
flexDirection: 'column'
|
|
368
|
+
/* #endif */
|
|
369
|
+
};
|
|
370
|
+
// TODO 兼容 type 属性 ,后续会废弃
|
|
371
|
+
if (type) return;
|
|
372
|
+
this.showPopup = true;
|
|
373
|
+
this.showTrans = true;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
};
|
|
360
377
|
</script>
|
|
361
378
|
<style scoped>
|
|
362
|
-
|
|
379
|
+
@charset "UTF-8";
|
|
363
380
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
381
|
+
.uni-popup {
|
|
382
|
+
position: fixed;
|
|
383
|
+
/* #ifndef APP-NVUE */
|
|
384
|
+
z-index: 99;
|
|
385
|
+
/* #endif */
|
|
386
|
+
}
|
|
370
387
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
388
|
+
.uni-popup.top,
|
|
389
|
+
.uni-popup.left,
|
|
390
|
+
.uni-popup.right {
|
|
391
|
+
/* #ifdef H5 */
|
|
392
|
+
top: var(--window-top);
|
|
393
|
+
/* #endif */
|
|
394
|
+
/* #ifndef H5 */
|
|
395
|
+
top: 0;
|
|
396
|
+
/* #endif */
|
|
397
|
+
}
|
|
381
398
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
399
|
+
.uni-popup .uni-popup__wrapper {
|
|
400
|
+
/* #ifndef APP-NVUE */
|
|
401
|
+
display: block;
|
|
402
|
+
/* #endif */
|
|
403
|
+
position: relative;
|
|
404
|
+
/* iphonex 等安全区设置,底部安全区适配 */
|
|
405
|
+
/* #ifndef APP-NVUE */
|
|
406
|
+
/* #endif */
|
|
407
|
+
}
|
|
391
408
|
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
409
|
+
.uni-popup .uni-popup__wrapper.left,
|
|
410
|
+
.uni-popup .uni-popup__wrapper.right {
|
|
411
|
+
/* #ifdef H5 */
|
|
412
|
+
padding-top: var(--window-top);
|
|
413
|
+
/* #endif */
|
|
414
|
+
/* #ifndef H5 */
|
|
415
|
+
padding-top: 0;
|
|
416
|
+
/* #endif */
|
|
417
|
+
flex: 1;
|
|
418
|
+
}
|
|
402
419
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
420
|
+
.fixforpc-z-index {
|
|
421
|
+
/* #ifndef APP-NVUE */
|
|
422
|
+
z-index: 999;
|
|
423
|
+
/* #endif */
|
|
424
|
+
}
|
|
408
425
|
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
</style>
|
|
426
|
+
.fixforpc-top {
|
|
427
|
+
top: 0;
|
|
428
|
+
}
|
|
429
|
+
</style>
|