uview-plus 3.4.14 → 3.4.16

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 (33) hide show
  1. package/changelog.md +13 -0
  2. package/components/u-dropdown/u-dropdown.vue +8 -7
  3. package/components/u-icon/u-icon.vue +41 -35
  4. package/components/u-modal/modal.js +2 -1
  5. package/components/u-modal/props.js +5 -0
  6. package/components/u-modal/u-modal.vue +8 -3
  7. package/components/u-picker-data/u-picker-data.vue +1 -1
  8. package/components/u-sticky/u-sticky.vue +5 -0
  9. package/components/u-swiper/u-swiper.vue +1 -1
  10. package/libs/util/gcanvas/bridge/bridge-weex.js +0 -0
  11. package/libs/util/gcanvas/context-2d/FillStyleLinearGradient.js +0 -0
  12. package/libs/util/gcanvas/context-2d/FillStylePattern.js +0 -0
  13. package/libs/util/gcanvas/context-2d/FillStyleRadialGradient.js +0 -0
  14. package/libs/util/gcanvas/context-2d/RenderingContext.js +0 -0
  15. package/libs/util/gcanvas/context-webgl/ActiveInfo.js +0 -0
  16. package/libs/util/gcanvas/context-webgl/Buffer.js +0 -0
  17. package/libs/util/gcanvas/context-webgl/Framebuffer.js +0 -0
  18. package/libs/util/gcanvas/context-webgl/GLenum.js +0 -0
  19. package/libs/util/gcanvas/context-webgl/GLmethod.js +0 -0
  20. package/libs/util/gcanvas/context-webgl/GLtype.js +0 -0
  21. package/libs/util/gcanvas/context-webgl/Program.js +0 -0
  22. package/libs/util/gcanvas/context-webgl/Renderbuffer.js +0 -0
  23. package/libs/util/gcanvas/context-webgl/RenderingContext.js +0 -0
  24. package/libs/util/gcanvas/context-webgl/Shader.js +0 -0
  25. package/libs/util/gcanvas/context-webgl/ShaderPrecisionFormat.js +0 -0
  26. package/libs/util/gcanvas/context-webgl/Texture.js +0 -0
  27. package/libs/util/gcanvas/context-webgl/UniformLocation.js +0 -0
  28. package/libs/util/gcanvas/context-webgl/classUtils.js +0 -0
  29. package/libs/util/gcanvas/env/canvas.js +0 -0
  30. package/libs/util/gcanvas/env/image.js +0 -0
  31. package/libs/util/gcanvas/env/tool.js +0 -0
  32. package/libs/util/gcanvas/index.js +0 -0
  33. package/package.json +1 -1
package/changelog.md CHANGED
@@ -1,3 +1,16 @@
1
+ ## 3.4.16(2025-04-10)
2
+ fix: 修复安卓新加载字体方式导致Cannot read property '$page' of undefined
3
+
4
+ ## 3.4.15(2025-04-10)
5
+ improvment: 优化移步加载数据时swiper组件displayMultipleItems报错
6
+
7
+ feat: modal增加contentStyle属性
8
+
9
+ fix: 修复下拉菜单收起动画缺失
10
+
11
+ fix: 修复sticky的offset属性值为响应式数据时失效 #237
12
+
13
+
1
14
  ## 3.4.14(2025-04-09)
2
15
  feat: 支持自托管内置图标及扩展自定义图标
3
16
 
@@ -20,11 +20,12 @@
20
20
  </view>
21
21
  </view>
22
22
  <view class="u-dropdown__content" :style="[contentStyle, {
23
- transition: `opacity ${duration / 1000}s linear`,
23
+ transition: `opacity ${duration / 1000}s, z-index ${duration / 1000}s linear`,
24
24
  top: addUnit(height)
25
25
  }]"
26
26
  @tap="maskClick" @touchmove.stop.prevent>
27
- <view @tap.stop.prevent class="u-dropdown__content__popup" :style="[popupStyle]">
27
+ <view @tap.stop.prevent class="u-dropdown__content__popup" :style="[popupStyle, {
28
+ }]">
28
29
  <slot></slot>
29
30
  </view>
30
31
  <view class="u-dropdown__content__mask"></view>
@@ -147,11 +148,11 @@
147
148
  this.active = false;
148
149
  this.current = 99999;
149
150
  // 下拉内容的样式进行调整,不透明度设置为0
150
- this.contentStyle = {
151
- zIndex: -1,
152
- opacity: 0,
153
- height: '0px'
154
- }
151
+ this.contentStyle.zIndex = -1;
152
+ this.contentStyle.opacity = 0;
153
+ setTimeout(() => {
154
+ this.contentStyle.height = 0;
155
+ }, this.duration)
155
156
  },
156
157
  // 点击遮罩
157
158
  maskClick() {
@@ -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', {
@@ -28,6 +28,7 @@ export default {
28
28
  confirmButtonShape: '',
29
29
  contentTextAlign: 'left',
30
30
  asyncCloseTip: '操作中...',
31
- asyncCancelClose: false
31
+ asyncCancelClose: false,
32
+ contentStyle: {}
32
33
  }
33
34
  }
@@ -97,6 +97,11 @@ export const props = defineMixin({
97
97
  type: Boolean,
98
98
  default: () => defProps.modal.asyncCancelClose
99
99
  },
100
+ // 内容样式
101
+ contentStyle: {
102
+ type: Object,
103
+ default: () => defProps.modal.contentStyle
104
+ },
100
105
 
101
106
  }
102
107
  })
@@ -26,9 +26,7 @@
26
26
  >{{ title }}</view>
27
27
  <view
28
28
  class="u-modal__content"
29
- :style="{
30
- paddingTop: `${title ? 12 : 25}px`
31
- }"
29
+ :style="contentStyleCpu"
32
30
  >
33
31
  <slot>
34
32
  <text class="u-modal__content__text" :style="{textAlign: contentTextAlign}">
@@ -138,6 +136,13 @@
138
136
  }
139
137
  },
140
138
  emits: ["confirm", "cancel", "close", "update:show", 'cancelOnAsync'],
139
+ computed: {
140
+ contentStyleCpu() {
141
+ let style = this.contentStyle;
142
+ style.paddingTop = `${title ? 12 : 25}px`
143
+ return style;
144
+ }
145
+ },
141
146
  methods: {
142
147
  addUnit,
143
148
  // 点击确定按钮
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <view class="u-picker-data">
3
3
  <view class="u-picker-data__trigger">
4
- <slot name="trigger"></slot>
4
+ <slot name="trigger" :current="current"></slot>
5
5
  <up-input
6
6
  v-if="!$slots['trigger']"
7
7
  :modelValue="current"
@@ -90,6 +90,11 @@
90
90
  mounted() {
91
91
  this.init()
92
92
  },
93
+ watch: {
94
+ offsetTop(nval) {
95
+ this.getStickyTop()
96
+ }
97
+ },
93
98
  methods: {
94
99
  init() {
95
100
  this.getStickyTop()
@@ -30,7 +30,7 @@
30
30
  :previousMargin="addUnit(previousMargin)"
31
31
  :nextMargin="addUnit(nextMargin)"
32
32
  :acceleration="acceleration"
33
- :displayMultipleItems="displayMultipleItems"
33
+ :displayMultipleItems="list.length > 0 ? displayMultipleItems : 0"
34
34
  :easingFunction="easingFunction"
35
35
  >
36
36
  <swiper-item
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.14",
5
+ "version": "3.4.16",
6
6
  "description": "零云®uview-plus已兼容vue3,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
7
7
  "keywords": [
8
8
  "uview",