uview-plus 3.4.16 → 3.4.17

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
@@ -1,3 +1,9 @@
1
+ ## 3.4.18(2025-04-13)
2
+ fix: upload组件支持所有文件类型的onClickPreview事件
3
+
4
+ ## 3.4.17(2025-04-11)
5
+ feat: select组件text插槽增加scope传递currentLabel
6
+
1
7
  ## 3.4.16(2025-04-10)
2
8
  fix: 修复安卓新加载字体方式导致Cannot read property '$page' of undefined
3
9
 
@@ -2,7 +2,7 @@
2
2
  <view class="u-select">
3
3
  <view class="u-select__content">
4
4
  <view class="u-select__label" @click="openSelect">
5
- <slot name="text">
5
+ <slot name="text" :currentLabel="currentLabel">
6
6
  <text class="u-select__text" v-if="showOptionsLabel">
7
7
  {{ currentLabel }}
8
8
  </text>
@@ -56,7 +56,7 @@ export const props = defineMixin({
56
56
  type: Function,
57
57
  default: null
58
58
  },
59
- // 是否显示组件自带的图片预览功能
59
+ // 是否显示组件自带的图片&视频预览功能
60
60
  previewFullImage: {
61
61
  type: Boolean,
62
62
  default: () => defProps.upload.previewFullImage
@@ -12,7 +12,7 @@
12
12
  :src="item.thumb || item.url"
13
13
  :mode="imageMode"
14
14
  class="u-upload__wrap__preview__image"
15
- @tap="onPreviewImage(item, index)"
15
+ @tap="onClickPreview(item, index)"
16
16
  :style="[{
17
17
  width: addUnit(width),
18
18
  height: addUnit(height)
@@ -29,7 +29,7 @@
29
29
  :src="item.thumb"
30
30
  :mode="imageMode"
31
31
  class="u-upload__wrap__preview__image"
32
- @tap="onPreviewVideo(item, index)"
32
+ @tap="onClickPreview(item, index)"
33
33
  :style="[{
34
34
  width: addUnit(width),
35
35
  height: addUnit(height)
@@ -43,7 +43,7 @@
43
43
  ></u-icon>
44
44
  <view v-if="item.status === 'success'"
45
45
  class="u-upload__wrap__play"
46
- @tap="onPreviewVideo(item, index)">
46
+ @tap="onClickPreview(item, index)">
47
47
  <slot name="playIcon"></slot>
48
48
  <up-icon v-if="!$slots['playIcon']"
49
49
  class="u-upload__wrap__play__icon"
@@ -640,13 +640,17 @@
640
640
  // #endif
641
641
  },
642
642
  onClickPreview(item, index) {
643
- if (!this.previewFullImage) return;
644
- switch (item.type) {
645
- case 'video':
646
- this.onPreviewVideo(index);
647
- break;
648
- default:
649
- break;
643
+ if (this.previewFullImage) {
644
+ switch (item.type) {
645
+ case 'image':
646
+ this.onPreviewImage(item, index);
647
+ break;
648
+ case 'video':
649
+ this.onPreviewVideo(item, index);
650
+ break;
651
+ default:
652
+ break;
653
+ }
650
654
  }
651
655
  this.$emit(
652
656
  'clickPreview',
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "id": "uview-plus",
3
3
  "name": "uview-plus",
4
4
  "displayName": "零云®uview-plus3.0重磅发布,全面的Vue3鸿蒙移动组件库。",
5
- "version": "3.4.16",
5
+ "version": "3.4.17",
6
6
  "description": "零云®uview-plus已兼容vue3,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
7
7
  "keywords": [
8
8
  "uview",