uview-plus 3.3.62 → 3.3.65

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 (37) hide show
  1. package/changelog.md +15 -0
  2. package/components/u-calendar/calendar.js +2 -1
  3. package/components/u-calendar/header.vue +14 -7
  4. package/components/u-calendar/props.js +6 -1
  5. package/components/u-calendar/u-calendar.vue +2 -0
  6. package/components/u-cate-tab/u-cate-tab.vue +11 -7
  7. package/components/u-image/u-image.vue +4 -5
  8. package/components/u-number-box/numberBox.js +5 -1
  9. package/components/u-number-box/props.js +21 -1
  10. package/components/u-number-box/u-number-box.vue +41 -34
  11. package/components/u-status-bar/u-status-bar.vue +7 -2
  12. package/components/u-textarea/u-textarea.vue +1 -1
  13. package/components/u-waterfall/u-waterfall.vue +12 -10
  14. package/libs/util/gcanvas/bridge/bridge-weex.js +0 -0
  15. package/libs/util/gcanvas/context-2d/FillStyleLinearGradient.js +0 -0
  16. package/libs/util/gcanvas/context-2d/FillStylePattern.js +0 -0
  17. package/libs/util/gcanvas/context-2d/FillStyleRadialGradient.js +0 -0
  18. package/libs/util/gcanvas/context-2d/RenderingContext.js +0 -0
  19. package/libs/util/gcanvas/context-webgl/ActiveInfo.js +0 -0
  20. package/libs/util/gcanvas/context-webgl/Buffer.js +0 -0
  21. package/libs/util/gcanvas/context-webgl/Framebuffer.js +0 -0
  22. package/libs/util/gcanvas/context-webgl/GLenum.js +0 -0
  23. package/libs/util/gcanvas/context-webgl/GLmethod.js +0 -0
  24. package/libs/util/gcanvas/context-webgl/GLtype.js +0 -0
  25. package/libs/util/gcanvas/context-webgl/Program.js +0 -0
  26. package/libs/util/gcanvas/context-webgl/Renderbuffer.js +0 -0
  27. package/libs/util/gcanvas/context-webgl/RenderingContext.js +0 -0
  28. package/libs/util/gcanvas/context-webgl/Shader.js +0 -0
  29. package/libs/util/gcanvas/context-webgl/ShaderPrecisionFormat.js +0 -0
  30. package/libs/util/gcanvas/context-webgl/Texture.js +0 -0
  31. package/libs/util/gcanvas/context-webgl/UniformLocation.js +0 -0
  32. package/libs/util/gcanvas/context-webgl/classUtils.js +0 -0
  33. package/libs/util/gcanvas/env/canvas.js +0 -0
  34. package/libs/util/gcanvas/env/image.js +0 -0
  35. package/libs/util/gcanvas/env/tool.js +0 -0
  36. package/libs/util/gcanvas/index.js +0 -0
  37. package/package.json +1 -1
package/changelog.md CHANGED
@@ -1,3 +1,18 @@
1
+ ## 3.3.65(2025-02-03)
2
+ feat: number-box组件新增按钮圆角/按钮宽度/数据框背景色/迷你模式
3
+
4
+ ## 3.3.64(2025-01-18)
5
+ feat: 日历组件支持自定义星期文案
6
+
7
+ ## 3.3.63(2025-01-13)
8
+ fix: cate-tab支持支付宝小程序
9
+
10
+ fix: textarea 修复 placeholder-style
11
+
12
+ fix: 修复在图片加载及加载失败时容器宽度
13
+
14
+ fix: waterfall组件报错Maximum recursive updates
15
+
1
16
  ## 3.3.62(2025-01-10)
2
17
  feat: sleder滑动选择器双滑块增加外层触发值的变动功能
3
18
 
@@ -37,6 +37,7 @@ export default {
37
37
  showRangePrompt: true,
38
38
  allowSameDay: false,
39
39
  round: 0,
40
- monthNum: 3
40
+ monthNum: 3,
41
+ weekText: ['一', '二', '三', '四', '五', '六', '日']
41
42
  }
42
43
  }
@@ -9,13 +9,13 @@
9
9
  v-if="showSubtitle"
10
10
  >{{ subtitle }}</text>
11
11
  <view class="u-calendar-header__weekdays">
12
- <text class="u-calendar-header__weekdays__weekday">一</text>
13
- <text class="u-calendar-header__weekdays__weekday">二</text>
14
- <text class="u-calendar-header__weekdays__weekday">三</text>
15
- <text class="u-calendar-header__weekdays__weekday">四</text>
16
- <text class="u-calendar-header__weekdays__weekday">五</text>
17
- <text class="u-calendar-header__weekdays__weekday">六</text>
18
- <text class="u-calendar-header__weekdays__weekday">日</text>
12
+ <text class="u-calendar-header__weekdays__weekday">{{ weekText[0] }}</text>
13
+ <text class="u-calendar-header__weekdays__weekday">{{ weekText[1] }}</text>
14
+ <text class="u-calendar-header__weekdays__weekday">{{ weekText[2] }}</text>
15
+ <text class="u-calendar-header__weekdays__weekday">{{ weekText[3] }}</text>
16
+ <text class="u-calendar-header__weekdays__weekday">{{ weekText[4] }}</text>
17
+ <text class="u-calendar-header__weekdays__weekday">{{ weekText[5] }}</text>
18
+ <text class="u-calendar-header__weekdays__weekday">{{ weekText[6] }}</text>
19
19
  </view>
20
20
  </view>
21
21
  </template>
@@ -47,6 +47,13 @@
47
47
  type: Boolean,
48
48
  default: true
49
49
  },
50
+ // 星期文本
51
+ weekText: {
52
+ type: Boolean,
53
+ default: () => {
54
+ return ['一', '二', '三', '四', '五', '六', '日']
55
+ }
56
+ },
50
57
  },
51
58
  data() {
52
59
  return {
@@ -142,6 +142,11 @@ export const props = defineMixin({
142
142
  monthNum: {
143
143
  type: [Number, String],
144
144
  default: 3
145
- }
145
+ },
146
+ // 星期文案
147
+ weekText: {
148
+ type: Array,
149
+ default: defProps.calendar.weekText
150
+ }
146
151
  }
147
152
  })
@@ -13,6 +13,7 @@
13
13
  :subtitle="subtitle"
14
14
  :showSubtitle="showSubtitle"
15
15
  :showTitle="showTitle"
16
+ :weekText="weekText"
16
17
  ></uHeader>
17
18
  <scroll-view
18
19
  :style="{
@@ -106,6 +107,7 @@ import test from '../../libs/function/test';
106
107
  * @property {Boolean} allowSameDay 是否允许日期范围的起止时间为同一天,mode = range时有效 (默认 false )
107
108
  * @property {Number|String} round 圆角值,默认无圆角 (默认 0 )
108
109
  * @property {Number|String} monthNum 最多展示的月份数量 (默认 3 )
110
+ * @property {Array} weekText 星期文案 (默认 ['一', '二', '三', '四', '五', '六', '日'] )
109
111
  *
110
112
  * @event {Function()} confirm 点击确定按钮时触发 选择日期相关的返回参数
111
113
  * @event {Function()} close 日历关闭时触发 可定义页面关闭时的回调事件
@@ -7,16 +7,20 @@
7
7
  <view v-for="(item, index) in tabList" :key="index" class="u-cate-tab__item"
8
8
  :class="[current == index ? 'u-cate-tab__item-active' : '']"
9
9
  @tap.stop="swichMenu(index)">
10
- <slot name="tabItem" :item="item">
11
- <text class="u-line-1">{{item[tabKeyName]}}</text>
10
+ <slot name="tabItem" :item="item">
12
11
  </slot>
12
+ <text v-if="!$slots['tabItem']" class="u-line-1">{{item[tabKeyName]}}</text>
13
13
  </view>
14
14
  </scroll-view>
15
- <scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="u-cate-tab__right-box" @scroll="rightScroll">
15
+ <scroll-view :scroll-top="scrollRightTop" scroll-with-animation
16
+ scroll-y class="u-cate-tab__right-box" @scroll="rightScroll">
16
17
  <view class="u-cate-tab__page-view">
17
- <view class="u-cate-tab__page-item" :id="'item' + index" v-for="(item , index) in tabList" :key="index">
18
+ <view class="u-cate-tab__page-item" :id="'item' + index"
19
+ v-for="(item , index) in tabList" :key="index">
18
20
  <slot name="itemList" :item="item">
19
- <view class="item-title">
21
+ </slot>
22
+ <template v-if="!$slots['itemList']">
23
+ <view class="item-title">
20
24
  <text>{{item[tabKeyName]}}</text>
21
25
  </view>
22
26
  <view class="item-container">
@@ -29,7 +33,7 @@
29
33
  </slot>
30
34
  </template>
31
35
  </view>
32
- </slot>
36
+ </template>
33
37
  </view>
34
38
  </view>
35
39
  </scroll-view>
@@ -141,7 +145,7 @@
141
145
  // 获取右边菜单每个item到顶部的距离
142
146
  getMenuItemTop() {
143
147
  new Promise(resolve => {
144
- let selectorQuery = uni.createSelectorQuery();
148
+ let selectorQuery = uni.createSelectorQuery().in(this);
145
149
  selectorQuery.selectAll('.u-cate-tab__page-item').boundingClientRect((rects) => {
146
150
  // 如果节点尚未生成,rects值为[](因为用selectAll,所以返回的是数组),循环调用执行
147
151
  if(!rects.length) {
@@ -115,7 +115,6 @@
115
115
  if (!n) {
116
116
  // 如果传入null或者'',或者false,或者undefined,标记为错误状态
117
117
  this.isError = true
118
-
119
118
  } else {
120
119
  this.isError = false;
121
120
  this.loading = true;
@@ -132,12 +131,12 @@
132
131
  style.height = addUnit(this.height);
133
132
  // #endif
134
133
  // #ifndef APP-NVUE
135
- if (this.width == '100%') {
134
+ if (this.loading || this.isError || this.width == '100%' || this.mode != 'heightFix') {
136
135
  style.width = this.width;
137
136
  } else {
138
137
  style.width = 'fit-content';
139
138
  }
140
- if (this.height == '100%') {
139
+ if (this.loading || this.isError || this.height == '100%' || this.mode != 'widthFix') {
141
140
  style.height = this.height;
142
141
  } else {
143
142
  style.height = 'fit-content';
@@ -153,12 +152,12 @@
153
152
  style.height = addUnit(this.height);
154
153
  // #endif
155
154
  // #ifndef APP-NVUE
156
- if (this.width == '100%') {
155
+ if (this.loading || this.isError || this.width == '100%' || this.mode != 'heightFix') {
157
156
  style.width = this.width;
158
157
  } else {
159
158
  style.width = 'fit-content';
160
159
  }
161
- if (this.height == '100%') {
160
+ if (this.loading || this.isError || this.height == '100%' || this.mode != 'widthFix') {
162
161
  style.height = this.height;
163
162
  } else {
164
163
  style.height = 'fit-content';
@@ -25,11 +25,15 @@ export default {
25
25
  decimalLength: null,
26
26
  longPress: true,
27
27
  color: '#323233',
28
+ buttonWidth: 30,
28
29
  buttonSize: 30,
30
+ buttonRadius: '0px',
29
31
  bgColor: '#EBECEE',
32
+ inputBgColor: '#EBECEE',
30
33
  cursorSpacing: 100,
31
34
  disableMinus: false,
32
35
  disablePlus: false,
33
- iconStyle: ''
36
+ iconStyle: '',
37
+ miniMode: false
34
38
  }
35
39
  }
@@ -86,16 +86,31 @@ export const props = defineMixin({
86
86
  type: String,
87
87
  default: () => defProps.numberBox.color
88
88
  },
89
+ // 按钮宽度
90
+ buttonWidth: {
91
+ type: [String, Number],
92
+ default: () => defProps.numberBox.buttonWidth
93
+ },
89
94
  // 按钮大小,宽高等于此值,单位px,输入框高度和此值保持一致
90
95
  buttonSize: {
91
96
  type: [String, Number],
92
97
  default: () => defProps.numberBox.buttonSize
93
98
  },
99
+ // 按钮圆角
100
+ buttonRadius: {
101
+ type: [String],
102
+ default: () => defProps.numberBox.buttonRadius
103
+ },
94
104
  // 输入框和按钮的背景颜色
95
105
  bgColor: {
96
106
  type: String,
97
107
  default: () => defProps.numberBox.bgColor
98
108
  },
109
+ // 输入框背景颜色
110
+ inputBgColor: {
111
+ type: String,
112
+ default: () => defProps.numberBox.inputBgColor
113
+ },
99
114
  // 指定光标于键盘的距离,避免键盘遮挡输入框,单位px
100
115
  cursorSpacing: {
101
116
  type: [String, Number],
@@ -115,6 +130,11 @@ export const props = defineMixin({
115
130
  iconStyle: {
116
131
  type: [Object, String],
117
132
  default: () => defProps.numberBox.iconStyle
118
- }
133
+ },
134
+ // 迷你模式
135
+ miniMode: {
136
+ type: Boolean,
137
+ default: () => defProps.numberBox.miniMode
138
+ },
119
139
  }
120
140
  })
@@ -5,12 +5,12 @@
5
5
  @tap.stop="clickHandler('minus')"
6
6
  @touchstart="onTouchStart('minus')"
7
7
  @touchend.stop="clearTimeout"
8
- v-if="showMinus && $slots.minus"
8
+ v-if="showMinus && !hideMinus && $slots.minus"
9
9
  >
10
10
  <slot name="minus" />
11
11
  </view>
12
12
  <view
13
- v-else-if="showMinus"
13
+ v-else-if="showMinus && !hideMinus"
14
14
  class="u-number-box__minus cursor-pointer"
15
15
  @tap.stop="clickHandler('minus')"
16
16
  @touchstart="onTouchStart('minus')"
@@ -29,36 +29,38 @@
29
29
  ></u-icon>
30
30
  </view>
31
31
 
32
- <slot name="input">
33
- <!-- #ifdef MP-WEIXIN -->
34
- <input
35
- :disabled="disabledInput || disabled"
36
- :cursor-spacing="getCursorSpacing"
37
- :class="{ 'u-number-box__input--disabled': disabled || disabledInput }"
38
- :value="currentValue"
39
- class="u-number-box__input"
40
- @blur="onBlur"
41
- @focus="onFocus"
42
- @input="onInput"
43
- type="number"
44
- :style="[inputStyle]"
45
- />
46
- <!-- #endif -->
47
- <!-- #ifndef MP-WEIXIN -->
48
- <input
49
- :disabled="disabledInput || disabled"
50
- :cursor-spacing="getCursorSpacing"
51
- :class="{ 'u-number-box__input--disabled': disabled || disabledInput }"
52
- v-model="currentValue"
53
- class="u-number-box__input"
54
- @blur="onBlur"
55
- @focus="onFocus"
56
- @input="onInput"
57
- type="number"
58
- :style="[inputStyle]"
59
- />
60
- <!-- #endif -->
61
- </slot>
32
+ <template v-if="!hideMinus">
33
+ <slot name="input">
34
+ <!-- #ifdef MP-WEIXIN -->
35
+ <input
36
+ :disabled="disabledInput || disabled"
37
+ :cursor-spacing="getCursorSpacing"
38
+ :class="{ 'u-number-box__input--disabled': disabled || disabledInput }"
39
+ :value="currentValue"
40
+ class="u-number-box__input"
41
+ @blur="onBlur"
42
+ @focus="onFocus"
43
+ @input="onInput"
44
+ type="number"
45
+ :style="[inputStyle]"
46
+ />
47
+ <!-- #endif -->
48
+ <!-- #ifndef MP-WEIXIN -->
49
+ <input
50
+ :disabled="disabledInput || disabled"
51
+ :cursor-spacing="getCursorSpacing"
52
+ :class="{ 'u-number-box__input--disabled': disabled || disabledInput }"
53
+ v-model="currentValue"
54
+ class="u-number-box__input"
55
+ @blur="onBlur"
56
+ @focus="onFocus"
57
+ @input="onInput"
58
+ type="number"
59
+ :style="[inputStyle]"
60
+ />
61
+ <!-- #endif -->
62
+ </slot>
63
+ </template>
62
64
  <view
63
65
  class="u-number-box__slot cursor-pointer"
64
66
  @tap.stop="clickHandler('plus')"
@@ -164,6 +166,9 @@
164
166
  // #endif
165
167
  },
166
168
  computed: {
169
+ hideMinus() {
170
+ return this.currentValue == 0 && this.miniMode == true
171
+ },
167
172
  getCursorSpacing() {
168
173
  // 判断传入的单位,如果为px单位,需要转成px
169
174
  return getPx(this.cursorSpacing)
@@ -173,8 +178,10 @@
173
178
  return (type) => {
174
179
  const style = {
175
180
  backgroundColor: this.bgColor,
181
+ width: addUnit(this.buttonWidth),
176
182
  height: addUnit(this.buttonSize),
177
- color: this.color
183
+ color: this.color,
184
+ borderRadius: this.buttonRadius
178
185
  }
179
186
  if (this.isDisabled(type)) {
180
187
  style.backgroundColor = '#f7f8fa'
@@ -187,7 +194,7 @@
187
194
  const disabled = this.disabled || this.disabledInput
188
195
  const style = {
189
196
  color: this.color,
190
- backgroundColor: this.bgColor,
197
+ backgroundColor: this.inputBgColor || this.bgColor,
191
198
  height: addUnit(this.buttonSize),
192
199
  width: addUnit(this.inputWidth)
193
200
  }
@@ -26,7 +26,7 @@
26
26
  mixins: [mpMixin, mixin, props],
27
27
  data() {
28
28
  return {
29
- isH5: true
29
+ isH5: false
30
30
  }
31
31
  },
32
32
  created() {
@@ -38,7 +38,12 @@
38
38
  style() {
39
39
  const style = {}
40
40
  // 状态栏高度,由于某些安卓和微信开发工具无法识别css的顶部状态栏变量,所以使用js获取的方式
41
- style.height = addUnit(getWindowInfo().statusBarHeight, 'px')
41
+ let sheight = getWindowInfo().statusBarHeight
42
+ if (sheight == 0) {
43
+ this.isH5 = true
44
+ } else {
45
+ style.height = addUnit(sheight, 'px')
46
+ }
42
47
  style.backgroundColor = this.bgColor
43
48
  return deepMerge(style, addStyle(this.customStyle))
44
49
  }
@@ -5,7 +5,7 @@
5
5
  :value="innerValue"
6
6
  :style="{ height: addUnit(height) }"
7
7
  :placeholder="placeholder"
8
- :placeholder-style="addStyle(placeholderStyle, 'string')"
8
+ :placeholder-style="addStyle(placeholderStyle, typeof placeholderStyle === 'string' ? 'string' : 'object')"
9
9
  :placeholder-class="placeholderClass"
10
10
  :disabled="disabled"
11
11
  :focus="focus"
@@ -68,7 +68,7 @@
68
68
  watch: {
69
69
  copyFlowList(nVal, oVal) {
70
70
  if (!nVal || nVal.length == 0) {
71
- this.clear();
71
+ this.clear(false);
72
72
  // console.log('clear');
73
73
  } else {
74
74
  // 取差值,即这一次数组变化新增的部分
@@ -88,7 +88,7 @@
88
88
  copyFlowList() {
89
89
  // #ifdef VUE3
90
90
  if (!this.modelValue || this.modelValue.length == 0) {
91
- this.clear();
91
+ this.clear(false);
92
92
  // console.log('clear');
93
93
  return [];
94
94
  } else {
@@ -138,16 +138,18 @@
138
138
  return JSON.parse(JSON.stringify(data));
139
139
  },
140
140
  // 清空数据列表
141
- clear() {
141
+ clear(bak = true) {
142
142
  this.leftList = [];
143
143
  this.rightList = [];
144
144
  // 同时清除父组件列表中的数据
145
- // #ifdef VUE2
146
- this.$emit('input', []);
147
- // #endif
148
- // #ifdef VUE3
149
- this.$emit('update:modelValue', []);
150
- // #endif
145
+ if (bak) {
146
+ // #ifdef VUE2
147
+ this.$emit('input', []);
148
+ // #endif
149
+ // #ifdef VUE3
150
+ this.$emit('update:modelValue', []);
151
+ // #endif
152
+ }
151
153
  this.tempList = [];
152
154
  },
153
155
  // 清除某一条指定的数据,根据id实现
@@ -241,4 +243,4 @@
241
243
  max-width: 100%;
242
244
  /* #endif */
243
245
  }
244
- </style>
246
+ </style>
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.3.62",
5
+ "version": "3.3.65",
6
6
  "description": "零云®uview-plus已兼容vue3,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
7
7
  "keywords": [
8
8
  "uview",