uview-plus 3.4.31 → 3.4.33
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 +16 -0
- package/components/u-album/u-album.vue +18 -3
- package/components/u-cate-tab/u-cate-tab.vue +5 -3
- package/components/u-datetime-picker/u-datetime-picker.vue +6 -3
- package/components/u-navbar/props.js +5 -0
- package/components/u-navbar/u-navbar.vue +3 -2
- package/components/u-qrcode/qrcode.js +14 -6
- package/components/u-qrcode/u-qrcode.vue +10 -0
- package/components/u-upload/u-upload.vue +1 -1
- package/libs/function/test.js +8 -1
- package/libs/util/gcanvas/bridge/bridge-weex.js +0 -0
- package/libs/util/gcanvas/context-2d/FillStyleLinearGradient.js +0 -0
- package/libs/util/gcanvas/context-2d/FillStylePattern.js +0 -0
- package/libs/util/gcanvas/context-2d/FillStyleRadialGradient.js +0 -0
- package/libs/util/gcanvas/context-2d/RenderingContext.js +0 -0
- package/libs/util/gcanvas/context-webgl/ActiveInfo.js +0 -0
- package/libs/util/gcanvas/context-webgl/Buffer.js +0 -0
- package/libs/util/gcanvas/context-webgl/Framebuffer.js +0 -0
- package/libs/util/gcanvas/context-webgl/GLenum.js +0 -0
- package/libs/util/gcanvas/context-webgl/GLmethod.js +0 -0
- package/libs/util/gcanvas/context-webgl/GLtype.js +0 -0
- package/libs/util/gcanvas/context-webgl/Program.js +0 -0
- package/libs/util/gcanvas/context-webgl/Renderbuffer.js +0 -0
- package/libs/util/gcanvas/context-webgl/RenderingContext.js +0 -0
- package/libs/util/gcanvas/context-webgl/Shader.js +0 -0
- package/libs/util/gcanvas/context-webgl/ShaderPrecisionFormat.js +0 -0
- package/libs/util/gcanvas/context-webgl/Texture.js +0 -0
- package/libs/util/gcanvas/context-webgl/UniformLocation.js +0 -0
- package/libs/util/gcanvas/context-webgl/classUtils.js +0 -0
- package/libs/util/gcanvas/env/canvas.js +0 -0
- package/libs/util/gcanvas/env/image.js +0 -0
- package/libs/util/gcanvas/env/tool.js +0 -0
- package/libs/util/gcanvas/index.js +0 -0
- package/package.json +1 -1
- package/types/comps/navbar.d.ts +5 -0
package/changelog.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## 3.4.33(2025-05-27)
|
|
2
|
+
fix: 修复小程序cate-tab第一次切换时没反应 感谢@jiaruiyan
|
|
3
|
+
|
|
4
|
+
fix: 修复datetimepicker传入空字符串时导致组件崩溃 感谢@jiaruiyan
|
|
5
|
+
|
|
6
|
+
fix: 修复album带单位的字符串参与计算导致的计算数据错误 感谢@jiaruiyan
|
|
7
|
+
|
|
8
|
+
## 3.4.32(2025-05-26)
|
|
9
|
+
feat: 增加状态栏独立颜色配置支持支付宝小程序状态栏对背景色识别的不友好的情况
|
|
10
|
+
|
|
11
|
+
fix: 抖音二维码兼容修复
|
|
12
|
+
|
|
13
|
+
feat: cate-tab组件增加rightTop插槽 #715
|
|
14
|
+
|
|
15
|
+
fix: 修改 test.promise(res) 预期结果不一致
|
|
16
|
+
|
|
1
17
|
## 3.4.31(2025-05-17)
|
|
2
18
|
fix: 修复parse富文本组件导致鸿蒙运行白屏
|
|
3
19
|
|
|
@@ -213,14 +213,29 @@ export default {
|
|
|
213
213
|
uni.getImageInfo({
|
|
214
214
|
src,
|
|
215
215
|
success: (res) => {
|
|
216
|
+
let singleSize = this.singleSize;
|
|
217
|
+
// 单位
|
|
218
|
+
let unit = '';
|
|
219
|
+
if (Number.isNaN(Number(this.singleSize))) {
|
|
220
|
+
// 大小中有字符 则记录字符
|
|
221
|
+
unit = this.singleSize.replace(/\d+/g, ''); // 单位
|
|
222
|
+
singleSize = Number(this.singleSize.replace(/\D+/g, ''), 10); // 具体值
|
|
223
|
+
}
|
|
224
|
+
|
|
216
225
|
// 判断图片横向还是竖向展示方式
|
|
217
226
|
const isHorizotal = res.width >= res.height
|
|
218
227
|
this.singleWidth = isHorizotal
|
|
219
|
-
?
|
|
220
|
-
: (res.width / res.height) *
|
|
228
|
+
? singleSize
|
|
229
|
+
: (res.width / res.height) * singleSize
|
|
221
230
|
this.singleHeight = !isHorizotal
|
|
222
|
-
?
|
|
231
|
+
? singleSize
|
|
223
232
|
: (res.height / res.width) * this.singleWidth
|
|
233
|
+
|
|
234
|
+
// 如果有单位统一设置单位
|
|
235
|
+
if(unit != null && unit !== ''){
|
|
236
|
+
this.singleWidth = this.singleWidth + unit
|
|
237
|
+
this.singleHeight = this.singleHeight + unit
|
|
238
|
+
}
|
|
224
239
|
},
|
|
225
240
|
fail: () => {
|
|
226
241
|
this.getComponentWidth()
|
|
@@ -14,8 +14,10 @@
|
|
|
14
14
|
</scroll-view>
|
|
15
15
|
<scroll-view :scroll-top="scrollRightTop" scroll-with-animation
|
|
16
16
|
scroll-y class="u-cate-tab__right-box" @scroll="rightScroll">
|
|
17
|
+
<slot name="rightTop" :tabList="tabList">
|
|
18
|
+
</slot>
|
|
17
19
|
<view class="u-cate-tab__page-view">
|
|
18
|
-
<view class="u-cate-tab__page-item" :id="'item' + index"
|
|
20
|
+
<view class="u-cate-tab__page-item" :id="'item' + index"
|
|
19
21
|
v-for="(item , index) in tabList" :key="index">
|
|
20
22
|
<slot name="itemList" :item="item">
|
|
21
23
|
</slot>
|
|
@@ -165,7 +167,7 @@
|
|
|
165
167
|
},
|
|
166
168
|
// 获取右边菜单每个item到顶部的距离
|
|
167
169
|
getMenuItemTop() {
|
|
168
|
-
new Promise(resolve => {
|
|
170
|
+
return new Promise(resolve => {
|
|
169
171
|
let selectorQuery = uni.createSelectorQuery().in(this);
|
|
170
172
|
selectorQuery.selectAll('.u-cate-tab__page-item').boundingClientRect((rects) => {
|
|
171
173
|
// 如果节点尚未生成,rects值为[](因为用selectAll,所以返回的是数组),循环调用执行
|
|
@@ -179,8 +181,8 @@
|
|
|
179
181
|
rects.forEach((rect) => {
|
|
180
182
|
// 这里减去rects[0].top,是因为第一项顶部可能不是贴到导航栏(比如有个搜索框的情况)
|
|
181
183
|
this.arr.push(rect.top - rects[0].top);
|
|
182
|
-
resolve();
|
|
183
184
|
})
|
|
185
|
+
resolve();
|
|
184
186
|
}).exec()
|
|
185
187
|
})
|
|
186
188
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="u-datetime-picker">
|
|
3
3
|
<view v-if="hasInput" class="u-datetime-picker__has-input"
|
|
4
|
-
@click="onShowByClickInput"
|
|
4
|
+
@click="onShowByClickInput"
|
|
5
5
|
>
|
|
6
6
|
<slot name="trigger" :value="inputValue">
|
|
7
7
|
<up-input
|
|
@@ -436,7 +436,10 @@
|
|
|
436
436
|
},
|
|
437
437
|
// 根据minDate、maxDate、minHour、maxHour等边界值,判断各列的开始和结束边界值
|
|
438
438
|
getBoundary(type, innerValue) {
|
|
439
|
-
|
|
439
|
+
let value = new Date(innerValue)
|
|
440
|
+
if(isNaN(value.getTime())){
|
|
441
|
+
value = new Date()
|
|
442
|
+
}
|
|
440
443
|
const boundary = new Date(this[`${type}Date`])
|
|
441
444
|
const year = dayjs(boundary).year()
|
|
442
445
|
let month = 1
|
|
@@ -475,7 +478,7 @@
|
|
|
475
478
|
if(!this.disabled){
|
|
476
479
|
this.showByClickInput = !this.showByClickInput
|
|
477
480
|
}
|
|
478
|
-
|
|
481
|
+
|
|
479
482
|
}
|
|
480
483
|
}
|
|
481
484
|
}
|
|
@@ -58,6 +58,11 @@ export const props = defineMixin({
|
|
|
58
58
|
type: String,
|
|
59
59
|
default: () => defProps.navbar.bgColor
|
|
60
60
|
},
|
|
61
|
+
// 状态栏背景颜色 不写会使用背景颜色bgColor
|
|
62
|
+
statusBarBgColor: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: () => ''
|
|
65
|
+
},
|
|
61
66
|
// 标题的宽度
|
|
62
67
|
titleWidth: {
|
|
63
68
|
type: [String, Number],
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<view :class="[fixed && 'u-navbar--fixed']">
|
|
11
11
|
<u-status-bar
|
|
12
12
|
v-if="safeAreaInsetTop"
|
|
13
|
-
:bgColor="bgColor"
|
|
13
|
+
:bgColor="statusBarBgColor ? statusBarBgColor : bgColor"
|
|
14
14
|
></u-status-bar>
|
|
15
15
|
<view
|
|
16
16
|
class="u-navbar__content"
|
|
@@ -94,6 +94,7 @@
|
|
|
94
94
|
* @property {String} title 导航栏标题,如设置为空字符,将会隐藏标题占位区域
|
|
95
95
|
* @property {String} titleColor 文字颜色 (默认 '' )
|
|
96
96
|
* @property {String} bgColor 导航栏背景设置 (默认 '#ffffff' )
|
|
97
|
+
* @property {String} statusBarBgColor 状态栏背景颜色 不写同导航栏背景设置
|
|
97
98
|
* @property {String | Number} titleWidth 导航栏标题的最大宽度,内容超出会以省略号隐藏 (默认 '400rpx' )
|
|
98
99
|
* @property {String | Number} height 导航栏高度(不包括状态栏高度在内,内部自动加上)(默认 '44px' )
|
|
99
100
|
* @property {String | Number} leftIconSize 左侧返回图标的大小(默认 20px )
|
|
@@ -170,7 +171,7 @@
|
|
|
170
171
|
|
|
171
172
|
&__left {
|
|
172
173
|
left: 0;
|
|
173
|
-
|
|
174
|
+
|
|
174
175
|
&--hover {
|
|
175
176
|
opacity: 0.7;
|
|
176
177
|
}
|
|
@@ -1128,12 +1128,20 @@ let QRCode = {};
|
|
|
1128
1128
|
ctxi.setLineWidth(lineWidth);
|
|
1129
1129
|
ctxi.setFillStyle(options.background);
|
|
1130
1130
|
ctxi.setStrokeStyle(options.background);
|
|
1131
|
-
ctxi.beginPath(); // draw top and top right corner
|
|
1131
|
+
ctxi.beginPath(); // draw top and top right corner
|
|
1132
1132
|
ctxi.moveTo(x + r, y);
|
|
1133
|
-
ctxi.
|
|
1134
|
-
ctxi.
|
|
1135
|
-
|
|
1136
|
-
ctxi.
|
|
1133
|
+
ctxi.lineTo(x + width, y); // move to top-right corner
|
|
1134
|
+
ctxi.arc(x + width - r, y + r, r, -Math.PI / 2, 0); // draw right side and bottom right corner
|
|
1135
|
+
|
|
1136
|
+
ctxi.lineTo(x + width, y + height - r);
|
|
1137
|
+
ctxi.arc(x + width - r, y + height - r, r, 0, Math.PI / 2); // draw bottom and bottom left corner
|
|
1138
|
+
|
|
1139
|
+
ctxi.lineTo(x + r, y + height);
|
|
1140
|
+
ctxi.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI);// draw left and top left corner
|
|
1141
|
+
|
|
1142
|
+
ctxi.lineTo(x, y + r);
|
|
1143
|
+
ctxi.arc(x + r, y + r, r, Math.PI, Math.PI * 3 / 2);
|
|
1144
|
+
|
|
1137
1145
|
ctxi.closePath();
|
|
1138
1146
|
if (fill) {
|
|
1139
1147
|
ctxi.fill();
|
|
@@ -1232,4 +1240,4 @@ let QRCode = {};
|
|
|
1232
1240
|
};
|
|
1233
1241
|
})()
|
|
1234
1242
|
|
|
1235
|
-
export default QRCode
|
|
1243
|
+
export default QRCode
|
|
@@ -290,6 +290,16 @@ export default {
|
|
|
290
290
|
left: 0;
|
|
291
291
|
right: 0;
|
|
292
292
|
}
|
|
293
|
+
|
|
294
|
+
/* #ifdef MP-TOUTIAO */
|
|
295
|
+
/**字节小程序在编译时会出现一个 [hidde]:{ display: none !important; } 这个样式
|
|
296
|
+
* 会导致canvas 隐藏掉 没有找到具体原因先这样处理
|
|
297
|
+
*/
|
|
298
|
+
&__canvas {
|
|
299
|
+
display: block !important;
|
|
300
|
+
}
|
|
301
|
+
/* #endif */
|
|
302
|
+
|
|
293
303
|
&__content {
|
|
294
304
|
position: relative;
|
|
295
305
|
|
package/libs/function/test.js
CHANGED
|
@@ -237,6 +237,13 @@ export function object(value) {
|
|
|
237
237
|
return Object.prototype.toString.call(value) === '[object Object]'
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
+
/**
|
|
241
|
+
* 是否是Promise对象
|
|
242
|
+
*/
|
|
243
|
+
export function objectPromise(value) {
|
|
244
|
+
return Object.prototype.toString.call(value) === '[object Promise]';
|
|
245
|
+
}
|
|
246
|
+
|
|
240
247
|
/**
|
|
241
248
|
* 是否短信验证码
|
|
242
249
|
*/
|
|
@@ -257,7 +264,7 @@ export function func(value) {
|
|
|
257
264
|
* @param {Object} value
|
|
258
265
|
*/
|
|
259
266
|
export function promise(value) {
|
|
260
|
-
return
|
|
267
|
+
return objectPromise(value) && func(value.then) && func(value.catch)
|
|
261
268
|
}
|
|
262
269
|
|
|
263
270
|
/** 是否图片格式
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
package/types/comps/navbar.d.ts
CHANGED