uview-plus 3.4.15 → 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.
Files changed (29) hide show
  1. package/changelog.md +9 -0
  2. package/components/u-icon/u-icon.vue +41 -35
  3. package/components/u-select/u-select.vue +1 -1
  4. package/components/u-upload/props.js +1 -1
  5. package/components/u-upload/u-upload.vue +14 -10
  6. package/libs/util/gcanvas/bridge/bridge-weex.js +0 -0
  7. package/libs/util/gcanvas/context-2d/FillStyleLinearGradient.js +0 -0
  8. package/libs/util/gcanvas/context-2d/FillStylePattern.js +0 -0
  9. package/libs/util/gcanvas/context-2d/FillStyleRadialGradient.js +0 -0
  10. package/libs/util/gcanvas/context-2d/RenderingContext.js +0 -0
  11. package/libs/util/gcanvas/context-webgl/ActiveInfo.js +0 -0
  12. package/libs/util/gcanvas/context-webgl/Buffer.js +0 -0
  13. package/libs/util/gcanvas/context-webgl/Framebuffer.js +0 -0
  14. package/libs/util/gcanvas/context-webgl/GLenum.js +0 -0
  15. package/libs/util/gcanvas/context-webgl/GLmethod.js +0 -0
  16. package/libs/util/gcanvas/context-webgl/GLtype.js +0 -0
  17. package/libs/util/gcanvas/context-webgl/Program.js +0 -0
  18. package/libs/util/gcanvas/context-webgl/Renderbuffer.js +0 -0
  19. package/libs/util/gcanvas/context-webgl/RenderingContext.js +0 -0
  20. package/libs/util/gcanvas/context-webgl/Shader.js +0 -0
  21. package/libs/util/gcanvas/context-webgl/ShaderPrecisionFormat.js +0 -0
  22. package/libs/util/gcanvas/context-webgl/Texture.js +0 -0
  23. package/libs/util/gcanvas/context-webgl/UniformLocation.js +0 -0
  24. package/libs/util/gcanvas/context-webgl/classUtils.js +0 -0
  25. package/libs/util/gcanvas/env/canvas.js +0 -0
  26. package/libs/util/gcanvas/env/image.js +0 -0
  27. package/libs/util/gcanvas/env/tool.js +0 -0
  28. package/libs/util/gcanvas/index.js +0 -0
  29. package/package.json +1 -1
package/changelog.md CHANGED
@@ -1,3 +1,12 @@
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
+
7
+ ## 3.4.16(2025-04-10)
8
+ fix: 修复安卓新加载字体方式导致Cannot read property '$page' of undefined
9
+
1
10
  ## 3.4.15(2025-04-10)
2
11
  improvment: 优化移步加载数据时swiper组件displayMultipleItems报错
3
12
 
@@ -35,44 +35,10 @@
35
35
  </template>
36
36
 
37
37
  <script>
38
- import config from '../../libs/config/config';
39
- // #ifdef APP-NVUE
40
- // nvue通过weex的dom模块引入字体,相关文档地址如下:
41
- // https://weex.apache.org/zh/docs/modules/dom.html#addrule
42
- const domModule = weex.requireModule('dom');
43
- domModule.addRule('fontFace', {
44
- 'fontFamily': "uicon-iconfont",
45
- 'src': `url('${config.iconUrl}')`
46
- });
47
- // #endif
48
- // #ifdef APP || H5 || MP-WEIXIN || MP-ALIPAY
49
- uni.loadFontFace({
50
- family: 'uicon-iconfont',
51
- source: 'url("' + config.iconUrl + '")',
52
- success() {
53
- // console.log('内置字体图标加载成功');
54
- },
55
- fail() {
56
- console.error('内置字体图标加载出错');
57
- }
58
- });
59
- if (config.customIcon.family) {
60
- uni.loadFontFace({
61
- family: config.customIcon.family,
62
- source: 'url("' + config.customIcon.url + '")',
63
- success() {
64
- // console.log('扩展字体图标加载成功');
65
- },
66
- fail() {
67
- console.error('扩展字体图标加载出错');
68
- }
69
- });
70
- }
71
- // #endif
72
-
73
38
  // 引入图标名称,已经对应的unicode
74
39
  import icons from './icons';
75
40
  import { props } from './props';
41
+ import config from '../../libs/config/config';
76
42
  import { mpMixin } from '../../libs/mixin/mpMixin';
77
43
  import { mixin } from '../../libs/mixin/mixin';
78
44
  import { addUnit, addStyle } from '../../libs/function/index';
@@ -105,6 +71,46 @@
105
71
  export default {
106
72
  name: 'u-icon',
107
73
  beforeCreate() {
74
+
75
+ // #ifdef APP-NVUE
76
+ // nvue通过weex的dom模块引入字体,相关文档地址如下:
77
+ // https://weex.apache.org/zh/docs/modules/dom.html#addrule
78
+ const domModule = weex.requireModule('dom');
79
+ domModule.addRule('fontFace', {
80
+ 'fontFamily': "uicon-iconfont",
81
+ 'src': `url('${config.iconUrl}')`
82
+ });
83
+ if (config.customIcon.family) {
84
+ domModule.addRule('fontFace', {
85
+ 'fontFamily': config.customIcon.family,
86
+ 'src': `url('${config.customIcon.url}')`
87
+ });
88
+ }
89
+ // #endif
90
+ // #ifdef APP || H5 || MP-WEIXIN || MP-ALIPAY
91
+ uni.loadFontFace({
92
+ family: 'uicon-iconfont',
93
+ source: 'url("' + config.iconUrl + '")',
94
+ success() {
95
+ // console.log('内置字体图标加载成功');
96
+ },
97
+ fail() {
98
+ console.error('内置字体图标加载出错');
99
+ }
100
+ });
101
+ if (config.customIcon.family) {
102
+ uni.loadFontFace({
103
+ family: config.customIcon.family,
104
+ source: 'url("' + config.customIcon.url + '")',
105
+ success() {
106
+ // console.log('扩展字体图标加载成功');
107
+ },
108
+ fail() {
109
+ console.error('扩展字体图标加载出错');
110
+ }
111
+ });
112
+ }
113
+ // #endif
108
114
  // #ifdef APP-NVUE
109
115
  if (this.customFontFamily) {
110
116
  domModule.addRule('fontFace', {
@@ -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',
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
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.15",
5
+ "version": "3.4.17",
6
6
  "description": "零云®uview-plus已兼容vue3,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
7
7
  "keywords": [
8
8
  "uview",