uview-plus 3.4.6 → 3.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/changelog.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## 3.4.8(2025-03-27)
2
+ fix: 修复upload组件split报错
3
+
4
+ fix: 移除mapState
5
+
6
+ ## 3.4.7(2025-03-26)
7
+ fix: 修复action-sheet-data和picker-data数据回显
8
+
9
+ fix: 优化upload组件视频封面兼容
10
+
1
11
  ## 3.4.6(2025-03-25)
2
12
  feat: checkbox触发change时携带name参数
3
13
 
@@ -27,7 +27,6 @@
27
27
  </template>
28
28
 
29
29
  <script>
30
- import {mapState} from 'vuex';
31
30
  export default {
32
31
  props: {
33
32
  modelValue: {
@@ -73,6 +72,15 @@ export default {
73
72
  }
74
73
  },
75
74
  emits: ['update:modelValue'],
75
+ watch: {
76
+ modelValue() {
77
+ this.options.forEach((ele) => {
78
+ if (ele[this.valueKey] == this.modelValue) {
79
+ this.current = ele[this.labelKey]
80
+ }
81
+ })
82
+ }
83
+ },
76
84
  methods: {
77
85
  hideKeyboard() {
78
86
  uni.hideKeyboard()
@@ -24,7 +24,6 @@
24
24
  </template>
25
25
 
26
26
  <script>
27
- import {mapState} from 'vuex';
28
27
  export default {
29
28
  props: {
30
29
  modelValue: {
@@ -69,6 +68,17 @@ export default {
69
68
  })
70
69
  }
71
70
  },
71
+ watch: {
72
+ modelValue() {
73
+ if (this.modelValue) {
74
+ this.options.forEach((ele) => {
75
+ if (ele[this.valueKey] == this.modelValue) {
76
+ this.current = ele[this.labelKey]
77
+ }
78
+ })
79
+ }
80
+ }
81
+ },
72
82
  computed: {
73
83
  optionsInner() {
74
84
  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;
@@ -23,13 +23,13 @@ function formatImage(res) {
23
23
  file: item
24
24
  // #endif
25
25
  // #ifndef H5
26
- name: res.tempFilePath.split('/').pop() + '.png',
26
+ name: item.tempFilePath.split('/').pop() + '.png',
27
27
  // #endif
28
28
  }))
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']),
@@ -61,7 +61,7 @@ function formatMedia(res) {
61
61
  file: item
62
62
  // #endif
63
63
  // #ifndef H5
64
- name: res.tempFilePath.split('/').pop() + (res.type === 'video' ? '.mp4': '.png'),
64
+ name: item.tempFilePath.split('/').pop() + (res.type === 'video' ? '.mp4': '.png'),
65
65
  // #endif
66
66
  }))
67
67
  }
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.8",
6
6
  "description": "零云®uview-plus已兼容vue3,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
7
7
  "keywords": [
8
8
  "uview",