uview-plus 3.4.6 → 3.4.7

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,8 @@
1
+ ## 3.4.7(2025-03-26)
2
+ fix: 修复action-sheet-data和picker-data数据回显
3
+
4
+ fix: 优化upload组件视频封面兼容
5
+
1
6
  ## 3.4.6(2025-03-25)
2
7
  feat: checkbox触发change时携带name参数
3
8
 
@@ -73,6 +73,15 @@ export default {
73
73
  }
74
74
  },
75
75
  emits: ['update:modelValue'],
76
+ watch: {
77
+ modelValue() {
78
+ this.options.forEach((ele) => {
79
+ if (ele[this.valueKey] == this.modelValue) {
80
+ this.current = ele[this.labelKey]
81
+ }
82
+ })
83
+ }
84
+ },
76
85
  methods: {
77
86
  hideKeyboard() {
78
87
  uni.hideKeyboard()
@@ -69,6 +69,17 @@ export default {
69
69
  })
70
70
  }
71
71
  },
72
+ watch: {
73
+ modelValue() {
74
+ if (this.modelValue) {
75
+ this.options.forEach((ele) => {
76
+ if (ele[this.valueKey] == this.modelValue) {
77
+ this.current = ele[this.labelKey]
78
+ }
79
+ })
80
+ }
81
+ }
82
+ },
72
83
  computed: {
73
84
  optionsInner() {
74
85
  return [this.options];
@@ -18,9 +18,14 @@
18
18
  height: addUnit(height)
19
19
  }]"
20
20
  />
21
- <template
21
+ <view class="u-upload__wrap__preview__video"
22
+ :style="{
23
+ width: addUnit(width),
24
+ height: addUnit(height)
25
+ }"
22
26
  v-else-if="(item.isVideo || (item.type && item.type === 'video')) && getVideoThumb">
23
27
  <image
28
+ v-if="item.thumb"
24
29
  :src="item.thumb"
25
30
  :mode="imageMode"
26
31
  class="u-upload__wrap__preview__image"
@@ -30,6 +35,12 @@
30
35
  height: addUnit(height)
31
36
  }]"
32
37
  />
38
+ <u-icon
39
+ v-else
40
+ color="#80CBF9"
41
+ size="26"
42
+ :name="item.isVideo || (item.type && item.type === 'video') ? 'movie' : 'folder'"
43
+ ></u-icon>
33
44
  <view v-if="item.status === 'success'"
34
45
  class="u-upload__wrap__play"
35
46
  @tap="onPreviewVideo(item, index)">
@@ -38,7 +49,7 @@
38
49
  class="u-upload__wrap__play__icon"
39
50
  name="play-right" size="22px"></up-icon>
40
51
  </view>
41
- </template>
52
+ </view>
42
53
  <view
43
54
  v-else
44
55
  class="u-upload__wrap__preview__other"
@@ -721,6 +732,7 @@
721
732
  height: $u-upload-image-height;
722
733
  }
723
734
 
735
+ &__video,
724
736
  &__other {
725
737
  width: $u-upload-image-width;
726
738
  height: $u-upload-image-height;
@@ -29,7 +29,7 @@ function formatImage(res) {
29
29
  }
30
30
 
31
31
  function formatVideo(res) {
32
- console.log(res)
32
+ // console.log(res)
33
33
  return [
34
34
  {
35
35
  ...pickExclude(res, ['tempFilePath', 'thumbTempFilePath', 'errMsg']),
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.6",
5
+ "version": "3.4.7",
6
6
  "description": "零云®uview-plus已兼容vue3,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
7
7
  "keywords": [
8
8
  "uview",