uview-plus 3.2.21 → 3.2.22
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/changelog.md
CHANGED
|
@@ -30,9 +30,10 @@
|
|
|
30
30
|
</slot>
|
|
31
31
|
<view class="u-cell__right-icon-wrap" v-if="$slots['right-icon'] || isLink"
|
|
32
32
|
:class="[`u-cell__right-icon-wrap--${arrowDirection}`]">
|
|
33
|
-
<u-icon v-if="rightIcon && !$slots['right-icon']" :name="rightIcon"
|
|
33
|
+
<u-icon v-if="rightIcon && !$slots['right-icon']" :name="rightIcon"
|
|
34
|
+
:custom-style="rightIconStyle" :color="disabled ? '#c8c9cc' : 'info'"
|
|
34
35
|
:size="size === 'large' ? 18 : 16"></u-icon>
|
|
35
|
-
<slot v-else name="right-icon">
|
|
36
|
+
<slot v-else name="right-icon">
|
|
36
37
|
</slot>
|
|
37
38
|
</view>
|
|
38
39
|
<view class="u-cell__right-icon-wrap" v-if="$slots['righticon']"
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
if(!this.keepRunning || !this.timer) return
|
|
108
108
|
// 记录当前的时间戳,为了下次进入页面,如果还在倒计时内的话,继续倒计时
|
|
109
109
|
// 倒计时尚未结束,结果大于0;倒计时已经开始,就会小于初始值,如果等于初始值,说明没有开始倒计时,无需处理
|
|
110
|
-
if(this.secNum > 0 && this.secNum
|
|
110
|
+
if(this.secNum > 0 && this.secNum < this.seconds) {
|
|
111
111
|
// 获取当前时间戳(+ new Date()为特殊写法),除以1000变成秒,再去除小数部分
|
|
112
112
|
let nowTimestamp = Math.floor((+ new Date()) / 1000)
|
|
113
113
|
// 将本该结束时候的时间戳保存起来 => 当前时间戳 + 剩余的秒数
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
:arrowDirection="expanded ? 'up' : 'down'"
|
|
13
13
|
:disabled="disabled"
|
|
14
14
|
>
|
|
15
|
-
<!-- 微信小程序不支持,因为微信中不支持 <slot name="title"
|
|
15
|
+
<!-- 微信小程序不支持,因为微信中不支持 <slot name="title" #title />的写法 -->
|
|
16
16
|
<template #title>
|
|
17
17
|
<slot name="title">
|
|
18
18
|
<text v-if="!$slots.title && title">
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
</slot>
|
|
34
34
|
</template>
|
|
35
35
|
<template #right-icon>
|
|
36
|
+
<u-icon v-if="!$slots['right-icon']" :size="16" name="arrow-right"></u-icon>
|
|
36
37
|
<slot name="right-icon">
|
|
37
38
|
</slot>
|
|
38
39
|
</template>
|
|
@@ -21,13 +21,16 @@
|
|
|
21
21
|
<view
|
|
22
22
|
v-else
|
|
23
23
|
class="u-upload__wrap__preview__other"
|
|
24
|
+
@tap="onClickPreview($event, item)"
|
|
24
25
|
>
|
|
25
26
|
<u-icon
|
|
26
27
|
color="#80CBF9"
|
|
27
28
|
size="26"
|
|
28
29
|
:name="item.isVideo || (item.type && item.type === 'video') ? 'movie' : 'folder'"
|
|
29
30
|
></u-icon>
|
|
30
|
-
<text class="u-upload__wrap__preview__other__text">
|
|
31
|
+
<text class="u-upload__wrap__preview__other__text">
|
|
32
|
+
{{item.isVideo || (item.type && item.type === 'video') ? '视频' : '文件'}}
|
|
33
|
+
</text>
|
|
31
34
|
</view>
|
|
32
35
|
<view
|
|
33
36
|
class="u-upload__status"
|
|
@@ -335,6 +338,7 @@
|
|
|
335
338
|
const {
|
|
336
339
|
lists
|
|
337
340
|
} = this.data;
|
|
341
|
+
// #ifdef MP-WEIXIN
|
|
338
342
|
wx.previewMedia({
|
|
339
343
|
sources: lists
|
|
340
344
|
.filter((item) => isVideoFile(item))
|
|
@@ -348,12 +352,21 @@
|
|
|
348
352
|
toast('预览视频失败')
|
|
349
353
|
},
|
|
350
354
|
});
|
|
355
|
+
// #endif
|
|
351
356
|
},
|
|
352
357
|
onClickPreview(event) {
|
|
353
358
|
const {
|
|
354
359
|
index
|
|
355
360
|
} = event.currentTarget.dataset;
|
|
356
361
|
const item = this.data.lists[index];
|
|
362
|
+
if (!this.data.previewFullImage) return;
|
|
363
|
+
switch (item.type) {
|
|
364
|
+
case 'video':
|
|
365
|
+
this.onPreviewVideo(event);
|
|
366
|
+
break;
|
|
367
|
+
default:
|
|
368
|
+
break;
|
|
369
|
+
}
|
|
357
370
|
this.$emit(
|
|
358
371
|
'clickPreview',
|
|
359
372
|
Object.assign(Object.assign({}, item), this.getDetail(index))
|
package/libs/function/index.js
CHANGED
|
@@ -27,7 +27,7 @@ export function getPx(value, unit = false) {
|
|
|
27
27
|
}
|
|
28
28
|
// 如果带有rpx,先取出其数值部分,再转为px值
|
|
29
29
|
if (/(rpx|upx)$/.test(value)) {
|
|
30
|
-
return unit ? `${uni.
|
|
30
|
+
return unit ? `${uni.upx2px(parseInt(value))}px` : Number(uni.upx2px(parseInt(value)))
|
|
31
31
|
}
|
|
32
32
|
return unit ? `${parseInt(value)}px` : parseInt(value)
|
|
33
33
|
}
|