@vtj/materials 0.10.6 → 0.10.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.
Files changed (77) hide show
  1. package/dist/assets/antdv/index.umd.js +2 -2
  2. package/dist/assets/charts/index.umd.js +2 -2
  3. package/dist/assets/element/index.umd.js +2 -2
  4. package/dist/assets/ui/index.umd.js +2 -2
  5. package/dist/assets/uni-h5/index.umd.js +3 -3
  6. package/dist/assets/uni-ui/index.umd.js +3 -3
  7. package/dist/assets/vant/index.umd.js +2 -2
  8. package/dist/deps/@vtj/charts/index.umd.js +2 -2
  9. package/dist/deps/@vtj/icons/index.umd.js +2 -2
  10. package/dist/deps/@vtj/ui/index.umd.js +3 -3
  11. package/dist/deps/@vtj/utils/index.umd.js +20 -20
  12. package/dist/deps/@vueuse/core/index.iife.min.js +1 -1
  13. package/dist/deps/uni-ui/index.umd.js +1 -1
  14. package/dist/deps/uni-ui/style.css +1 -1
  15. package/package.json +7 -7
  16. package/src/uni-h5/components/input.ts +2 -2
  17. package/src/uni-h5/components/scrollView.ts +3 -3
  18. package/src/uni-h5/components/video.ts +1 -1
  19. package/src/uni-ui/components/badge.ts +1 -5
  20. package/src/uni-ui/components/breadcrumb.ts +1 -20
  21. package/src/uni-ui/components/collapse.ts +22 -23
  22. package/src/uni-ui/components/grid.ts +0 -9
  23. package/src/uni-ui/components/group.ts +1 -10
  24. package/src/uni-ui/components/index.ts +4 -4
  25. package/src/uni-ui/components/popup.ts +10 -2
  26. package/src/uni-ui/components/swiperDot.ts +21 -7
  27. package/src/uni-ui/components/table.ts +9 -3
  28. package/src/uni-ui/components/transition.ts +10 -1
  29. package/src/uni-ui/index.ts +19 -44
  30. package/src/uni-ui/lib/uni-collapse/uni-collapse.vue +153 -0
  31. package/src/uni-ui/lib/uni-collapse-item/uni-collapse-item.vue +425 -0
  32. package/src/uni-ui/lib/uni-data-picker/keypress.js +45 -0
  33. package/src/uni-ui/lib/uni-data-picker/uni-data-picker.vue +604 -0
  34. package/src/uni-ui/lib/uni-data-pickerview/uni-data-picker.js +622 -0
  35. package/src/uni-ui/lib/uni-data-pickerview/uni-data-pickerview.css +76 -0
  36. package/src/uni-ui/lib/uni-data-pickerview/uni-data-pickerview.vue +335 -0
  37. package/src/uni-ui/lib/uni-datetime-picker/calendar-item.vue +181 -170
  38. package/src/uni-ui/lib/uni-datetime-picker/calendar.vue +977 -939
  39. package/src/uni-ui/lib/uni-datetime-picker/time-picker.vue +1024 -932
  40. package/src/uni-ui/lib/uni-datetime-picker/uni-datetime-picker.vue +15 -17
  41. package/src/uni-ui/lib/uni-datetime-picker/util.js +419 -392
  42. package/src/uni-ui/lib/uni-fav/i18n/en.json +4 -0
  43. package/src/uni-ui/lib/uni-fav/i18n/index.js +8 -0
  44. package/src/uni-ui/lib/uni-fav/i18n/zh-Hans.json +4 -0
  45. package/src/uni-ui/lib/uni-fav/i18n/zh-Hant.json +4 -0
  46. package/src/uni-ui/lib/uni-fav/uni-fav.vue +170 -0
  47. package/src/uni-ui/lib/uni-file-picker/choose-and-upload-file.js +280 -0
  48. package/src/uni-ui/lib/uni-file-picker/uni-file-picker.vue +668 -0
  49. package/src/uni-ui/lib/uni-file-picker/upload-file.vue +325 -0
  50. package/src/uni-ui/lib/uni-file-picker/upload-image.vue +292 -0
  51. package/src/uni-ui/lib/uni-file-picker/utils.js +110 -0
  52. package/src/uni-ui/lib/uni-grid/uni-grid.vue +148 -0
  53. package/src/uni-ui/lib/uni-indexed-list/uni-indexed-list-item.vue +152 -128
  54. package/src/uni-ui/lib/uni-indexed-list/uni-indexed-list.vue +50 -50
  55. package/src/uni-ui/lib/uni-load-more/i18n/en.json +5 -0
  56. package/src/uni-ui/lib/uni-load-more/i18n/index.js +8 -0
  57. package/src/uni-ui/lib/uni-load-more/i18n/zh-Hans.json +5 -0
  58. package/src/uni-ui/lib/uni-load-more/i18n/zh-Hant.json +5 -0
  59. package/src/uni-ui/lib/uni-load-more/uni-load-more.vue +456 -0
  60. package/src/uni-ui/lib/uni-notice-bar/uni-notice-bar.vue +484 -0
  61. package/src/uni-ui/lib/uni-popup/uni-popup.vue +4 -4
  62. package/src/uni-ui/lib/uni-popup-message/uni-popup-message.vue +149 -0
  63. package/src/uni-ui/lib/uni-rate/uni-rate.vue +362 -343
  64. package/src/uni-ui/lib/uni-row/uni-row.vue +193 -0
  65. package/src/uni-ui/lib/uni-search-bar/i18n/en.json +4 -0
  66. package/src/uni-ui/lib/uni-search-bar/i18n/index.js +8 -0
  67. package/src/uni-ui/lib/uni-search-bar/i18n/zh-Hans.json +4 -0
  68. package/src/uni-ui/lib/uni-search-bar/i18n/zh-Hant.json +4 -0
  69. package/src/uni-ui/lib/uni-search-bar/uni-search-bar.vue +339 -0
  70. package/src/uni-ui/lib/uni-swipe-action-item/bindingx.js +294 -285
  71. package/src/uni-ui/lib/uni-swipe-action-item/uni-swipe-action-item.vue +8 -9
  72. package/src/uni-ui/lib/uni-th/filter-dropdown.vue +551 -503
  73. package/src/uni-ui/lib/uni-tr/table-checkbox.vue +165 -163
  74. package/src/uni-ui/lib/uni-tr/uni-tr.vue +6 -6
  75. package/src/uni-ui/lib/uni-transition/createAnimation.js +131 -0
  76. package/src/uni-ui/lib/uni-transition/uni-transition.vue +310 -0
  77. package/src/version.ts +2 -2
@@ -0,0 +1,484 @@
1
+ <template>
2
+ <view
3
+ v-if="show"
4
+ class="uni-noticebar"
5
+ :style="{ backgroundColor }"
6
+ @click="onClick">
7
+ <uni-icons
8
+ v-if="showIcon === true || showIcon === 'true'"
9
+ class="uni-noticebar-icon"
10
+ type="sound"
11
+ :color="color"
12
+ :size="fontSize * 1.5" />
13
+ <view
14
+ ref="textBox"
15
+ class="uni-noticebar__content-wrapper"
16
+ :class="{
17
+ 'uni-noticebar__content-wrapper--scrollable': scrollable,
18
+ 'uni-noticebar__content-wrapper--single':
19
+ !scrollable && (single || moreText)
20
+ }"
21
+ :style="{ height: scrollable ? fontSize * 1.5 + 'px' : 'auto' }">
22
+ <view
23
+ :id="elIdBox"
24
+ class="uni-noticebar__content"
25
+ :class="{
26
+ 'uni-noticebar__content--scrollable': scrollable,
27
+ 'uni-noticebar__content--single': !scrollable && (single || moreText)
28
+ }">
29
+ <text
30
+ :id="elId"
31
+ ref="animationEle"
32
+ class="uni-noticebar__content-text"
33
+ :class="{
34
+ 'uni-noticebar__content-text--scrollable': scrollable,
35
+ 'uni-noticebar__content-text--single':
36
+ !scrollable && (single || showGetMore)
37
+ }"
38
+ :style="{
39
+ color: color,
40
+ fontSize: fontSize + 'px',
41
+ lineHeight: fontSize * 1.5 + 'px',
42
+ width: wrapWidth + 'px',
43
+ animationDuration: animationDuration,
44
+ '-webkit-animationDuration': animationDuration,
45
+ animationPlayState: webviewHide ? 'paused' : animationPlayState,
46
+ '-webkit-animationPlayState': webviewHide
47
+ ? 'paused'
48
+ : animationPlayState,
49
+ animationDelay: animationDelay,
50
+ '-webkit-animationDelay': animationDelay
51
+ }"
52
+ >{{ text }}</text
53
+ >
54
+ </view>
55
+ </view>
56
+ <view
57
+ v-if="isShowGetMore"
58
+ class="uni-noticebar__more uni-cursor-point"
59
+ @click="clickMore">
60
+ <text
61
+ v-if="moreText.length > 0"
62
+ :style="{ color: moreColor, fontSize: fontSize + 'px' }"
63
+ >{{ moreText }}</text
64
+ >
65
+ <uni-icons
66
+ v-else
67
+ type="right"
68
+ :color="moreColor"
69
+ :size="fontSize * 1.1" />
70
+ </view>
71
+ <view class="uni-noticebar-close uni-cursor-point" v-if="isShowClose">
72
+ <uni-icons
73
+ type="closeempty"
74
+ :color="color"
75
+ :size="fontSize * 1.1"
76
+ @click="close" />
77
+ </view>
78
+ </view>
79
+ </template>
80
+
81
+ <script>
82
+ // #ifdef APP-NVUE
83
+ const dom = weex.requireModule('dom');
84
+ const animation = weex.requireModule('animation');
85
+ // #endif
86
+
87
+ /**
88
+ * NoticeBar 自定义导航栏
89
+ * @description 通告栏组件
90
+ * @tutorial https://ext.dcloud.net.cn/plugin?id=30
91
+ * @property {Number} speed 文字滚动的速度,默认100px/秒
92
+ * @property {String} text 显示文字
93
+ * @property {String} backgroundColor 背景颜色
94
+ * @property {String} color 文字颜色
95
+ * @property {String} moreColor 查看更多文字的颜色
96
+ * @property {String} moreText 设置“查看更多”的文本
97
+ * @property {Boolean} single = [true|false] 是否单行
98
+ * @property {Boolean} scrollable = [true|false] 是否滚动,为true时,NoticeBar为单行
99
+ * @property {Boolean} showIcon = [true|false] 是否显示左侧喇叭图标
100
+ * @property {Boolean} showClose = [true|false] 是否显示左侧关闭按钮
101
+ * @property {Boolean} showGetMore = [true|false] 是否显示右侧查看更多图标,为true时,NoticeBar为单行
102
+ * @event {Function} click 点击 NoticeBar 触发事件
103
+ * @event {Function} close 关闭 NoticeBar 触发事件
104
+ * @event {Function} getmore 点击”查看更多“时触发事件
105
+ */
106
+
107
+ export default {
108
+ name: 'UniNoticeBar',
109
+ emits: ['click', 'getmore', 'close'],
110
+ props: {
111
+ text: {
112
+ type: String,
113
+ default: ''
114
+ },
115
+ moreText: {
116
+ type: String,
117
+ default: ''
118
+ },
119
+ backgroundColor: {
120
+ type: String,
121
+ default: '#FFF9EA'
122
+ },
123
+ speed: {
124
+ // 默认1s滚动100px
125
+ type: Number,
126
+ default: 100
127
+ },
128
+ color: {
129
+ type: String,
130
+ default: '#FF9A43'
131
+ },
132
+ fontSize: {
133
+ type: Number,
134
+ default: 14
135
+ },
136
+ moreColor: {
137
+ type: String,
138
+ default: '#FF9A43'
139
+ },
140
+ single: {
141
+ // 是否单行
142
+ type: [Boolean, String],
143
+ default: false
144
+ },
145
+ scrollable: {
146
+ // 是否滚动,添加后控制单行效果取消
147
+ type: [Boolean, String],
148
+ default: false
149
+ },
150
+ showIcon: {
151
+ // 是否显示左侧icon
152
+ type: [Boolean, String],
153
+ default: false
154
+ },
155
+ showGetMore: {
156
+ // 是否显示右侧查看更多
157
+ type: [Boolean, String],
158
+ default: false
159
+ },
160
+ showClose: {
161
+ // 是否显示左侧关闭按钮
162
+ type: [Boolean, String],
163
+ default: false
164
+ }
165
+ },
166
+ data() {
167
+ const elId = `Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`;
168
+ const elIdBox = `Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`;
169
+ return {
170
+ textWidth: 0,
171
+ boxWidth: 0,
172
+ wrapWidth: '',
173
+ webviewHide: false,
174
+ // #ifdef APP-NVUE
175
+ stopAnimation: false,
176
+ // #endif
177
+ elId: elId,
178
+ elIdBox: elIdBox,
179
+ show: true,
180
+ animationDuration: 'none',
181
+ animationPlayState: 'paused',
182
+ animationDelay: '0s'
183
+ };
184
+ },
185
+ watch: {
186
+ text: function (newValue, oldValue) {
187
+ this.initSize();
188
+ }
189
+ },
190
+ computed: {
191
+ isShowGetMore() {
192
+ return this.showGetMore === true || this.showGetMore === 'true';
193
+ },
194
+ isShowClose() {
195
+ return (
196
+ (this.showClose === true || this.showClose === 'true') &&
197
+ (this.showGetMore === false || this.showGetMore === 'false')
198
+ );
199
+ }
200
+ },
201
+ mounted() {
202
+ // #ifdef APP-PLUS
203
+ // var pages = getCurrentPages();
204
+ // var page = pages[pages.length - 1];
205
+ // var currentWebview = page.$getAppWebview();
206
+ // currentWebview.addEventListener('hide', () => {
207
+ // this.webviewHide = true;
208
+ // });
209
+ // currentWebview.addEventListener('show', () => {
210
+ // this.webviewHide = false;
211
+ // });
212
+ // #endif
213
+ this.$nextTick(() => {
214
+ this.initSize();
215
+ });
216
+ },
217
+ // #ifdef APP-NVUE
218
+ beforeDestroy() {
219
+ this.stopAnimation = true;
220
+ },
221
+ // #endif
222
+ methods: {
223
+ initSize() {
224
+ if (this.scrollable) {
225
+ // #ifndef APP-NVUE
226
+ let query = [],
227
+ boxWidth = 0,
228
+ textWidth = 0;
229
+ let textQuery = new Promise((resolve, reject) => {
230
+ uni
231
+ .createSelectorQuery()
232
+ // #ifndef MP-ALIPAY
233
+ .in(this)
234
+ // #endif
235
+ .select(`#${this.elId}`)
236
+ .boundingClientRect()
237
+ .exec((ret) => {
238
+ this.textWidth = ret[0].width;
239
+ resolve();
240
+ });
241
+ });
242
+ let boxQuery = new Promise((resolve, reject) => {
243
+ uni
244
+ .createSelectorQuery()
245
+ // #ifndef MP-ALIPAY
246
+ .in(this)
247
+ // #endif
248
+ .select(`#${this.elIdBox}`)
249
+ .boundingClientRect()
250
+ .exec((ret) => {
251
+ this.boxWidth = ret[0].width;
252
+ resolve();
253
+ });
254
+ });
255
+ query.push(textQuery);
256
+ query.push(boxQuery);
257
+ Promise.all(query).then(() => {
258
+ this.animationDuration = `${this.textWidth / this.speed}s`;
259
+ this.animationDelay = `-${this.boxWidth / this.speed}s`;
260
+ setTimeout(() => {
261
+ this.animationPlayState = 'running';
262
+ }, 1000);
263
+ });
264
+ // #endif
265
+ // #ifdef APP-NVUE
266
+ dom.getComponentRect(this.$refs['animationEle'], (res) => {
267
+ let winWidth = uni.getSystemInfoSync().windowWidth;
268
+ this.textWidth = res.size.width;
269
+ animation.transition(
270
+ this.$refs['animationEle'],
271
+ {
272
+ styles: {
273
+ transform: `translateX(-${winWidth}px)`
274
+ },
275
+ duration: 0,
276
+ timingFunction: 'linear',
277
+ delay: 0
278
+ },
279
+ () => {
280
+ if (!this.stopAnimation) {
281
+ animation.transition(
282
+ this.$refs['animationEle'],
283
+ {
284
+ styles: {
285
+ transform: `translateX(-${this.textWidth}px)`
286
+ },
287
+ timingFunction: 'linear',
288
+ duration:
289
+ ((this.textWidth - winWidth) / this.speed) * 1000,
290
+ delay: 1000
291
+ },
292
+ () => {
293
+ if (!this.stopAnimation) {
294
+ this.loopAnimation();
295
+ }
296
+ }
297
+ );
298
+ }
299
+ }
300
+ );
301
+ });
302
+ // #endif
303
+ }
304
+ // #ifdef APP-NVUE
305
+ if (!this.scrollable && (this.single || this.moreText)) {
306
+ dom.getComponentRect(this.$refs['textBox'], (res) => {
307
+ this.wrapWidth = res.size.width;
308
+ });
309
+ }
310
+ // #endif
311
+ },
312
+ loopAnimation() {
313
+ // #ifdef APP-NVUE
314
+ animation.transition(
315
+ this.$refs['animationEle'],
316
+ {
317
+ styles: {
318
+ transform: `translateX(0px)`
319
+ },
320
+ duration: 0
321
+ },
322
+ () => {
323
+ if (!this.stopAnimation) {
324
+ animation.transition(
325
+ this.$refs['animationEle'],
326
+ {
327
+ styles: {
328
+ transform: `translateX(-${this.textWidth}px)`
329
+ },
330
+ duration: (this.textWidth / this.speed) * 1000,
331
+ timingFunction: 'linear',
332
+ delay: 0
333
+ },
334
+ () => {
335
+ if (!this.stopAnimation) {
336
+ this.loopAnimation();
337
+ }
338
+ }
339
+ );
340
+ }
341
+ }
342
+ );
343
+ // #endif
344
+ },
345
+ clickMore() {
346
+ this.$emit('getmore');
347
+ },
348
+ close() {
349
+ this.show = false;
350
+ this.$emit('close');
351
+ },
352
+ onClick() {
353
+ this.$emit('click');
354
+ }
355
+ }
356
+ };
357
+ </script>
358
+
359
+ <style lang="scss" scoped>
360
+ .uni-noticebar {
361
+ /* #ifndef APP-NVUE */
362
+ display: flex;
363
+ width: 100%;
364
+ box-sizing: border-box;
365
+ /* #endif */
366
+ flex-direction: row;
367
+ align-items: center;
368
+ padding: 10px 12px;
369
+ margin-bottom: 10px;
370
+ }
371
+
372
+ .uni-cursor-point {
373
+ /* #ifdef H5 */
374
+ cursor: pointer;
375
+ /* #endif */
376
+ }
377
+
378
+ .uni-noticebar-close {
379
+ margin-left: 8px;
380
+ margin-right: 5px;
381
+ }
382
+
383
+ .uni-noticebar-icon {
384
+ margin-right: 5px;
385
+ }
386
+
387
+ .uni-noticebar__content-wrapper {
388
+ flex: 1;
389
+ flex-direction: column;
390
+ overflow: hidden;
391
+ }
392
+
393
+ .uni-noticebar__content-wrapper--single {
394
+ /* #ifndef APP-NVUE */
395
+ line-height: 18px;
396
+ /* #endif */
397
+ }
398
+
399
+ .uni-noticebar__content-wrapper--single,
400
+ .uni-noticebar__content-wrapper--scrollable {
401
+ flex-direction: row;
402
+ }
403
+
404
+ /* #ifndef APP-NVUE */
405
+ .uni-noticebar__content-wrapper--scrollable {
406
+ position: relative;
407
+ }
408
+
409
+ /* #endif */
410
+
411
+ .uni-noticebar__content--scrollable {
412
+ /* #ifdef APP-NVUE */
413
+ flex: 0;
414
+ /* #endif */
415
+ /* #ifndef APP-NVUE */
416
+ flex: 1;
417
+ display: block;
418
+ overflow: hidden;
419
+ /* #endif */
420
+ }
421
+
422
+ .uni-noticebar__content--single {
423
+ /* #ifndef APP-NVUE */
424
+ display: flex;
425
+ flex: none;
426
+ width: 100%;
427
+ justify-content: center;
428
+ /* #endif */
429
+ }
430
+
431
+ .uni-noticebar__content-text {
432
+ font-size: 14px;
433
+ line-height: 18px;
434
+ /* #ifndef APP-NVUE */
435
+ word-break: break-all;
436
+ /* #endif */
437
+ }
438
+
439
+ .uni-noticebar__content-text--single {
440
+ /* #ifdef APP-NVUE */
441
+ lines: 1;
442
+ /* #endif */
443
+ /* #ifndef APP-NVUE */
444
+ display: block;
445
+ width: 100%;
446
+ white-space: nowrap;
447
+ /* #endif */
448
+ overflow: hidden;
449
+ text-overflow: ellipsis;
450
+ }
451
+
452
+ .uni-noticebar__content-text--scrollable {
453
+ /* #ifdef APP-NVUE */
454
+ lines: 1;
455
+ padding-left: 750rpx;
456
+ /* #endif */
457
+ /* #ifndef APP-NVUE */
458
+ position: absolute;
459
+ display: block;
460
+ height: 18px;
461
+ line-height: 18px;
462
+ white-space: nowrap;
463
+ padding-left: 100%;
464
+ animation: notice 10s 0s linear infinite both;
465
+ animation-play-state: paused;
466
+ /* #endif */
467
+ }
468
+
469
+ .uni-noticebar__more {
470
+ /* #ifndef APP-NVUE */
471
+ display: inline-flex;
472
+ /* #endif */
473
+ flex-direction: row;
474
+ flex-wrap: nowrap;
475
+ align-items: center;
476
+ padding-left: 5px;
477
+ }
478
+
479
+ @keyframes notice {
480
+ 100% {
481
+ transform: translate3d(-100%, 0, 0);
482
+ }
483
+ }
484
+ </style>
@@ -239,7 +239,7 @@
239
239
  // TODO fix by mehaotian 是否适配底部安全区 ,目前微信ios 、和 app ios 计算有差异,需要框架修复
240
240
  if (safeArea && this.safeArea) {
241
241
  // #ifdef MP-WEIXIN
242
- this.safeAreaInsets = screenHeight - safeArea.bottom;
242
+ // this.safeAreaInsets = screenHeight - safeArea.bottom;
243
243
  // #endif
244
244
  // #ifndef MP-WEIXIN
245
245
  this.safeAreaInsets = safeAreaInsets.bottom;
@@ -258,9 +258,9 @@
258
258
  },
259
259
  // #ifndef VUE3
260
260
  // TODO vue2
261
- destroyed() {
262
- this.setH5Visible();
263
- },
261
+ // destroyed() {
262
+ // this.setH5Visible();
263
+ // },
264
264
  // #endif
265
265
  // #ifdef VUE3
266
266
  // TODO vue3
@@ -0,0 +1,149 @@
1
+ <template>
2
+ <view class="uni-popup-message">
3
+ <view
4
+ class="uni-popup-message__box fixforpc-width"
5
+ :class="'uni-popup__' + type">
6
+ <slot>
7
+ <text
8
+ class="uni-popup-message-text"
9
+ :class="'uni-popup__' + type + '-text'"
10
+ >{{ message }}</text
11
+ >
12
+ </slot>
13
+ </view>
14
+ </view>
15
+ </template>
16
+
17
+ <script>
18
+ import popup from '../uni-popup/popup.js';
19
+ /**
20
+ * PopUp 弹出层-消息提示
21
+ * @description 弹出层-消息提示
22
+ * @tutorial https://ext.dcloud.net.cn/plugin?id=329
23
+ * @property {String} type = [success|warning|info|error] 主题样式
24
+ * @value success 成功
25
+ * @value warning 提示
26
+ * @value info 消息
27
+ * @value error 错误
28
+ * @property {String} message 消息提示文字
29
+ * @property {String} duration 显示时间,设置为 0 则不会自动关闭
30
+ */
31
+
32
+ export default {
33
+ name: 'uniPopupMessage',
34
+ mixins: [popup],
35
+ props: {
36
+ /**
37
+ * 主题 success/warning/info/error 默认 success
38
+ */
39
+ type: {
40
+ type: String,
41
+ default: 'success'
42
+ },
43
+ /**
44
+ * 消息文字
45
+ */
46
+ message: {
47
+ type: String,
48
+ default: ''
49
+ },
50
+ /**
51
+ * 显示时间,设置为 0 则不会自动关闭
52
+ */
53
+ duration: {
54
+ type: Number,
55
+ default: 3000
56
+ },
57
+ maskShow: {
58
+ type: Boolean,
59
+ default: false
60
+ }
61
+ },
62
+ data() {
63
+ return {};
64
+ },
65
+ created() {
66
+ // this.popup.maskShow = this.props.maskShow;
67
+ // this.popup.messageChild = this;
68
+ },
69
+ methods: {
70
+ timerClose() {
71
+ if (this.duration === 0) return;
72
+ clearTimeout(this.timer);
73
+ this.timer = setTimeout(() => {
74
+ this.popup.close();
75
+ }, this.duration);
76
+ }
77
+ }
78
+ };
79
+ </script>
80
+ <style lang="scss">
81
+ .uni-popup-message {
82
+ /* #ifndef APP-NVUE */
83
+ display: flex;
84
+ /* #endif */
85
+ flex-direction: row;
86
+ justify-content: center;
87
+ }
88
+
89
+ .uni-popup-message__box {
90
+ background-color: #e1f3d8;
91
+ padding: 10px 15px;
92
+ border-color: #eee;
93
+ border-style: solid;
94
+ border-width: 1px;
95
+ flex: 1;
96
+ }
97
+
98
+ @media screen and (min-width: 500px) {
99
+ .fixforpc-width {
100
+ margin-top: 20px;
101
+ border-radius: 4px;
102
+ flex: none;
103
+ min-width: 380px;
104
+ /* #ifndef APP-NVUE */
105
+ max-width: 50%;
106
+ /* #endif */
107
+ /* #ifdef APP-NVUE */
108
+ max-width: 500px;
109
+ /* #endif */
110
+ }
111
+ }
112
+
113
+ .uni-popup-message-text {
114
+ font-size: 14px;
115
+ padding: 0;
116
+ }
117
+
118
+ .uni-popup__success {
119
+ background-color: #e1f3d8;
120
+ }
121
+
122
+ .uni-popup__success-text {
123
+ color: #67c23a;
124
+ }
125
+
126
+ .uni-popup__warn {
127
+ background-color: #faecd8;
128
+ }
129
+
130
+ .uni-popup__warn-text {
131
+ color: #e6a23c;
132
+ }
133
+
134
+ .uni-popup__error {
135
+ background-color: #fde2e2;
136
+ }
137
+
138
+ .uni-popup__error-text {
139
+ color: #f56c6c;
140
+ }
141
+
142
+ .uni-popup__info {
143
+ background-color: #f2f6fc;
144
+ }
145
+
146
+ .uni-popup__info-text {
147
+ color: #909399;
148
+ }
149
+ </style>