uview-pro 0.6.0-beta.1 → 0.6.1
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 +46 -3
- package/components/u-picker/u-picker.vue +6 -2
- package/libs/util/canvas-2d.ts +135 -2
- package/package.json +1 -1
- package/theme.scss +35 -2
package/changelog.md
CHANGED
|
@@ -1,14 +1,57 @@
|
|
|
1
|
-
## 0.6.
|
|
1
|
+
## 0.6.1(2026-05-13)
|
|
2
2
|
|
|
3
3
|
### ✨ Features | 新功能
|
|
4
4
|
|
|
5
|
-
- **
|
|
6
|
-
- **u-
|
|
5
|
+
- **theme:** 添加默认颜色变量的RGB值支持 ([59af59f](https://github.com/anyup/uView-Pro/commit/59af59f5ea160155939ec4c6c3e33f968910c3e4))
|
|
6
|
+
- **u-picker:** 支持自定义标题插槽并调整样式 ([c3f2967](https://github.com/anyup/uView-Pro/commit/c3f296718a53449665cf14441ed1adef817274d1))
|
|
7
|
+
|
|
8
|
+
### 🚀 Chore | 构建/工程依赖/工具
|
|
9
|
+
|
|
10
|
+
- **release:** bump version to 0.6.0 ([cb7351f](https://github.com/anyup/uView-Pro/commit/cb7351fe85e96a5abcd2d4eea0c1771f62148fd0))
|
|
11
|
+
|
|
12
|
+
### 🐛 Bug Fixes | Bug 修复
|
|
13
|
+
|
|
14
|
+
- **canvas:** 修复头条小程序中CanvasContext的Illegal invocation错误 ([05ebe29](https://github.com/anyup/uView-Pro/commit/05ebe2998007421cf2d2db8664bbe2963419129f))
|
|
7
15
|
|
|
8
16
|
### 👥 Contributors
|
|
9
17
|
|
|
10
18
|
<a href="https://github.com/anyup"><img src="https://github.com/anyup.png?size=40" width="40" height="40" alt="anyup" title="anyup"/></a>
|
|
11
19
|
|
|
20
|
+
## 0.6.0(2026-05-12)
|
|
21
|
+
|
|
22
|
+
### ✨ Features | 新功能
|
|
23
|
+
|
|
24
|
+
- **theme:** 添加默认颜色变量的RGB值支持 ([59af59f](https://github.com/anyup/uView-Pro/commit/59af59f5ea160155939ec4c6c3e33f968910c3e4))
|
|
25
|
+
- **u-upload:** 新增image-shape属性支持圆形和方形展示 ([fac9414](https://github.com/anyup/uView-Pro/commit/fac941413ba4d944116513934306376a0188fcda))
|
|
26
|
+
- **u-upload:** 新增customChoose属性支持自定义文件选择功能 ([97e17ee](https://github.com/anyup/uView-Pro/commit/97e17eeae15c03a7791bb5eec4159782f3d70d84))
|
|
27
|
+
- **u-upload:** 新增多种上传模式和文件类型支持,支持图片、视频、文档等多种类型,支持网格(grid)和列表(list)两种展示模式 ([f75d34c](https://github.com/anyup/uView-Pro/commit/f75d34c22d551c41e8e873bc5779089ff2b2c0c7))
|
|
28
|
+
- **u-upload:** 新增 v-model 支持并优化文件列表同步逻辑 ([5548d84](https://github.com/anyup/uView-Pro/commit/5548d847b5c442da40775ec06ecfab7f0fddf448))
|
|
29
|
+
- **upload:** 完善上传组件示例页面功能,添加多种上传模式示例:图片上传(网格模式)、文件上传(列表模式)、视频上传 ([d43b3d2](https://github.com/anyup/uView-Pro/commit/d43b3d2c7f0ff7a7fe45467d49d451ca878b7eb1))
|
|
30
|
+
|
|
31
|
+
### ♻️ Code Refactoring | 代码重构
|
|
32
|
+
|
|
33
|
+
- **u-divider:** 规范化 slot 标签 ([fccac33](https://github.com/anyup/uView-Pro/commit/fccac33b6adce3395179d5c55b7b8a0a4d25a800))
|
|
34
|
+
|
|
35
|
+
### 🐛 Bug Fixes | Bug 修复
|
|
36
|
+
|
|
37
|
+
- **u-upload:** 优化微信小程序平台监听文件列表变化不触发on-list-change事件的场景 ([47fa5c1](https://github.com/anyup/uView-Pro/commit/47fa5c1dfa30214dfc40f7ee01b09f6f95d09b9a))
|
|
38
|
+
- **changelog:** 修复版本标题格式和Unreleased区块处理 ([3a87f47](https://github.com/anyup/uView-Pro/commit/3a87f4739cdebc1aafcb33e3f9b31dd79f9bc3d2))
|
|
39
|
+
|
|
40
|
+
### 👥 Contributors
|
|
41
|
+
|
|
42
|
+
<a href="https://github.com/anyup"><img src="https://github.com/anyup.png?size=40" width="40" height="40" alt="anyup" title="anyup"/></a>
|
|
43
|
+
|
|
44
|
+
## 0.6.0-beta.1(2026-05-08)
|
|
45
|
+
|
|
46
|
+
### ✨ Features | 新功能
|
|
47
|
+
|
|
48
|
+
- **u-upload:** 新增image-shape属性支持圆形和方形展示 ([fac9414](https://github.com/anyup/uView-Pro/commit/fac941413ba4d944116513934306376a0188fcda))
|
|
49
|
+
- **u-upload:** 新增customChoose属性支持自定义文件选择功能 ([97e17ee](https://github.com/anyup/uView-Pro/commit/97e17eeae15c03a7791bb5eec4159782f3d70d84))
|
|
50
|
+
|
|
51
|
+
### 👥 Contributors
|
|
52
|
+
|
|
53
|
+
<a href="https://github.com/anyup"><img src="https://github.com/anyup.png?size=40" width="40" height="40" alt="anyup" title="anyup"/></a>
|
|
54
|
+
|
|
12
55
|
## 0.6.0-beta.0(2026-04-30)
|
|
13
56
|
|
|
14
57
|
### ✨ Features | 新功能
|
|
@@ -21,7 +21,11 @@
|
|
|
21
21
|
>
|
|
22
22
|
{{ cancelText }}
|
|
23
23
|
</view>
|
|
24
|
-
<view class="u-picker__title u-line-1">
|
|
24
|
+
<view class="u-picker__title u-line-1">
|
|
25
|
+
<slot name="title">
|
|
26
|
+
{{ title }}
|
|
27
|
+
</slot>
|
|
28
|
+
</view>
|
|
25
29
|
<view
|
|
26
30
|
class="u-btn-picker u-btn-picker--primary"
|
|
27
31
|
:style="{ color: moving ? cancelColor : confirmColor }"
|
|
@@ -777,7 +781,7 @@ onMounted(() => {
|
|
|
777
781
|
|
|
778
782
|
.u-picker-header {
|
|
779
783
|
width: 100%;
|
|
780
|
-
height: 90rpx;
|
|
784
|
+
min-height: 90rpx;
|
|
781
785
|
@include vue-flex;
|
|
782
786
|
justify-content: space-between;
|
|
783
787
|
align-items: center;
|
package/libs/util/canvas-2d.ts
CHANGED
|
@@ -4,7 +4,46 @@
|
|
|
4
4
|
* @returns
|
|
5
5
|
*/
|
|
6
6
|
export function canvas2d(ctx: CanvasRenderingContext2D): UniApp.CanvasContext {
|
|
7
|
-
|
|
7
|
+
// 绑定 this 到 ctx,避免头条小程序等环境中出现 Illegal invocation 错误
|
|
8
|
+
const boundCtx = {
|
|
9
|
+
arc: ctx.arc.bind(ctx),
|
|
10
|
+
arcTo: ctx.arcTo.bind(ctx),
|
|
11
|
+
beginPath: ctx.beginPath.bind(ctx),
|
|
12
|
+
bezierCurveTo: ctx.bezierCurveTo.bind(ctx),
|
|
13
|
+
clearRect: ctx.clearRect.bind(ctx),
|
|
14
|
+
clip: ctx.clip.bind(ctx),
|
|
15
|
+
closePath: ctx.closePath.bind(ctx),
|
|
16
|
+
createImageData: ctx.createImageData.bind(ctx),
|
|
17
|
+
createLinearGradient: ctx.createLinearGradient.bind(ctx),
|
|
18
|
+
createPattern: ctx.createPattern.bind(ctx),
|
|
19
|
+
createRadialGradient: ctx.createRadialGradient.bind(ctx),
|
|
20
|
+
drawImage: ctx.drawImage.bind(ctx),
|
|
21
|
+
fill: ctx.fill.bind(ctx),
|
|
22
|
+
fillRect: ctx.fillRect.bind(ctx),
|
|
23
|
+
fillText: ctx.fillText.bind(ctx),
|
|
24
|
+
getImageData: ctx.getImageData.bind(ctx),
|
|
25
|
+
getLineDash: ctx.getLineDash.bind(ctx),
|
|
26
|
+
isPointInPath: ctx.isPointInPath.bind(ctx),
|
|
27
|
+
isPointInStroke: ctx.isPointInStroke.bind(ctx),
|
|
28
|
+
lineTo: ctx.lineTo.bind(ctx),
|
|
29
|
+
measureText: ctx.measureText.bind(ctx),
|
|
30
|
+
moveTo: ctx.moveTo.bind(ctx),
|
|
31
|
+
putImageData: ctx.putImageData.bind(ctx),
|
|
32
|
+
quadraticCurveTo: ctx.quadraticCurveTo.bind(ctx),
|
|
33
|
+
rect: ctx.rect.bind(ctx),
|
|
34
|
+
restore: ctx.restore.bind(ctx),
|
|
35
|
+
rotate: ctx.rotate.bind(ctx),
|
|
36
|
+
save: ctx.save.bind(ctx),
|
|
37
|
+
scale: ctx.scale.bind(ctx),
|
|
38
|
+
setLineDash: ctx.setLineDash.bind(ctx),
|
|
39
|
+
setTransform: ctx.setTransform.bind(ctx),
|
|
40
|
+
stroke: ctx.stroke.bind(ctx),
|
|
41
|
+
strokeRect: ctx.strokeRect.bind(ctx),
|
|
42
|
+
strokeText: ctx.strokeText.bind(ctx),
|
|
43
|
+
transform: ctx.transform.bind(ctx),
|
|
44
|
+
translate: ctx.translate.bind(ctx),
|
|
45
|
+
resetTransform: ctx.resetTransform?.bind(ctx),
|
|
46
|
+
roundRect: (ctx as any).roundRect?.bind(ctx),
|
|
8
47
|
setFillStyle(color: string | CanvasGradient) {
|
|
9
48
|
ctx.fillStyle = color;
|
|
10
49
|
},
|
|
@@ -45,5 +84,99 @@ export function canvas2d(ctx: CanvasRenderingContext2D): UniApp.CanvasContext {
|
|
|
45
84
|
createCircularGradient() {},
|
|
46
85
|
draw() {},
|
|
47
86
|
addColorStop() {}
|
|
48
|
-
}
|
|
87
|
+
};
|
|
88
|
+
// 复制属性访问器
|
|
89
|
+
Object.defineProperties(boundCtx, {
|
|
90
|
+
fillStyle: {
|
|
91
|
+
get: () => ctx.fillStyle,
|
|
92
|
+
set: value => {
|
|
93
|
+
ctx.fillStyle = value;
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
strokeStyle: {
|
|
97
|
+
get: () => ctx.strokeStyle,
|
|
98
|
+
set: value => {
|
|
99
|
+
ctx.strokeStyle = value;
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
lineWidth: {
|
|
103
|
+
get: () => ctx.lineWidth,
|
|
104
|
+
set: value => {
|
|
105
|
+
ctx.lineWidth = value;
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
lineCap: {
|
|
109
|
+
get: () => ctx.lineCap,
|
|
110
|
+
set: value => {
|
|
111
|
+
ctx.lineCap = value;
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
lineJoin: {
|
|
115
|
+
get: () => ctx.lineJoin,
|
|
116
|
+
set: value => {
|
|
117
|
+
ctx.lineJoin = value;
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
miterLimit: {
|
|
121
|
+
get: () => ctx.miterLimit,
|
|
122
|
+
set: value => {
|
|
123
|
+
ctx.miterLimit = value;
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
globalAlpha: {
|
|
127
|
+
get: () => ctx.globalAlpha,
|
|
128
|
+
set: value => {
|
|
129
|
+
ctx.globalAlpha = value;
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
globalCompositeOperation: {
|
|
133
|
+
get: () => ctx.globalCompositeOperation,
|
|
134
|
+
set: value => {
|
|
135
|
+
ctx.globalCompositeOperation = value;
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
font: {
|
|
139
|
+
get: () => ctx.font,
|
|
140
|
+
set: value => {
|
|
141
|
+
ctx.font = value;
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
textAlign: {
|
|
145
|
+
get: () => ctx.textAlign,
|
|
146
|
+
set: value => {
|
|
147
|
+
ctx.textAlign = value;
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
textBaseline: {
|
|
151
|
+
get: () => ctx.textBaseline,
|
|
152
|
+
set: value => {
|
|
153
|
+
ctx.textBaseline = value;
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
shadowOffsetX: {
|
|
157
|
+
get: () => ctx.shadowOffsetX,
|
|
158
|
+
set: value => {
|
|
159
|
+
ctx.shadowOffsetX = value;
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
shadowOffsetY: {
|
|
163
|
+
get: () => ctx.shadowOffsetY,
|
|
164
|
+
set: value => {
|
|
165
|
+
ctx.shadowOffsetY = value;
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
shadowBlur: {
|
|
169
|
+
get: () => ctx.shadowBlur,
|
|
170
|
+
set: value => {
|
|
171
|
+
ctx.shadowBlur = value;
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
shadowColor: {
|
|
175
|
+
get: () => ctx.shadowColor,
|
|
176
|
+
set: value => {
|
|
177
|
+
ctx.shadowColor = value;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
return boundCtx as unknown as UniApp.CanvasContext;
|
|
49
182
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "uview-pro",
|
|
3
3
|
"name": "uview-pro",
|
|
4
4
|
"displayName": "【支持鸿蒙】uView Pro|基于Vue3+TS的高质量UI组件库,支持多主题、暗黑模式、多语言",
|
|
5
|
-
"version": "0.6.
|
|
5
|
+
"version": "0.6.1",
|
|
6
6
|
"description": "uView Pro是基于Vue3+TS的多平台UI框架,提供80+高质量组件、便捷工具和常用模板,支持多主题、暗黑模式、多语言,支持H5/APP/鸿蒙/小程序多端开发。已在鸿蒙应用商店上架,欢迎体验!",
|
|
7
7
|
"main": "index.ts",
|
|
8
8
|
"module": "index.ts",
|
package/theme.scss
CHANGED
|
@@ -6,17 +6,25 @@
|
|
|
6
6
|
page {
|
|
7
7
|
/* 纯色 */
|
|
8
8
|
--u-white-color: #ffffff;
|
|
9
|
+
--u-white-color-rgb: 255, 255, 255;
|
|
9
10
|
--u-black-color: #000000;
|
|
11
|
+
--u-black-color-rgb: 0, 0, 0;
|
|
10
12
|
|
|
11
13
|
// 字体色
|
|
12
14
|
--u-main-color: #303133;
|
|
15
|
+
--u-main-color-rgb: 48, 49, 51;
|
|
13
16
|
--u-content-color: #606266;
|
|
17
|
+
--u-content-color-rgb: 96, 98, 102;
|
|
14
18
|
--u-tips-color: #909399;
|
|
19
|
+
--u-tips-color-rgb: 144, 147, 153;
|
|
15
20
|
--u-light-color: #c0c4cc;
|
|
21
|
+
--u-light-color-rgb: 192, 196, 204;
|
|
16
22
|
|
|
17
23
|
// 边框色
|
|
18
|
-
--u-border-color: #
|
|
24
|
+
--u-border-color: #dcdfe6;
|
|
25
|
+
--u-border-color-rgb: 220, 223, 230;
|
|
19
26
|
--u-divider-color: #e4e7ed;
|
|
27
|
+
--u-divider-color-rgb: 228, 231, 237;
|
|
20
28
|
|
|
21
29
|
// 遮罩色
|
|
22
30
|
--u-mask-color: rgba(0, 0, 0, 0.4);
|
|
@@ -24,40 +32,65 @@ page {
|
|
|
24
32
|
|
|
25
33
|
/* 背景色 */
|
|
26
34
|
--u-bg-color: #f3f4f6;
|
|
35
|
+
--u-bg-color-rgb: 243, 244, 246;
|
|
27
36
|
--u-bg-white: #ffffff;
|
|
37
|
+
--u-bg-white-rgb: 255, 255, 255;
|
|
28
38
|
--u-bg-gray-light: #f1f1f1;
|
|
39
|
+
--u-bg-gray-light-rgb: 241, 241, 241;
|
|
29
40
|
--u-bg-gray-dark: #2f343c;
|
|
41
|
+
--u-bg-gray-dark-rgb: 47, 52, 60;
|
|
30
42
|
--u-bg-black: #000000;
|
|
43
|
+
--u-bg-black-rgb: 0, 0, 0;
|
|
31
44
|
|
|
32
45
|
/* 主色 */
|
|
33
46
|
--u-type-primary: #2979ff;
|
|
34
|
-
--u-type-primary-
|
|
47
|
+
--u-type-primary-rgb: 41, 121, 255;
|
|
35
48
|
--u-type-primary-disabled: #a0cfff;
|
|
49
|
+
--u-type-primary-disabled-rgb: 160, 207, 255;
|
|
36
50
|
--u-type-primary-dark: #2b85e4;
|
|
51
|
+
--u-type-primary-dark-rgb: 43, 133, 228;
|
|
52
|
+
--u-type-primary-light: #ecf5ff;
|
|
53
|
+
--u-type-primary-light-rgb: 236, 245, 255;
|
|
37
54
|
|
|
38
55
|
/* 警告色 */
|
|
39
56
|
--u-type-warning: #ff9900;
|
|
57
|
+
--u-type-warning-rgb: 255, 153, 0;
|
|
40
58
|
--u-type-warning-disabled: #fcbd71;
|
|
59
|
+
--u-type-warning-disabled-rgb: 252, 189, 113;
|
|
41
60
|
--u-type-warning-dark: #f29100;
|
|
61
|
+
--u-type-warning-dark-rgb: 242, 145, 0;
|
|
42
62
|
--u-type-warning-light: #fdf6ec;
|
|
63
|
+
--u-type-warning-light-rgb: 253, 246, 236;
|
|
43
64
|
|
|
44
65
|
/* 成功色 */
|
|
45
66
|
--u-type-success: #19be6b;
|
|
67
|
+
--u-type-success-rgb: 25, 190, 107;
|
|
46
68
|
--u-type-success-disabled: #71d5a1;
|
|
69
|
+
--u-type-success-disabled-rgb: 113, 213, 161;
|
|
47
70
|
--u-type-success-dark: #18b566;
|
|
71
|
+
--u-type-success-dark-rgb: 24, 181, 102;
|
|
48
72
|
--u-type-success-light: #dbf1e1;
|
|
73
|
+
--u-type-success-light-rgb: 219, 241, 225;
|
|
49
74
|
|
|
50
75
|
/* 错误色 */
|
|
51
76
|
--u-type-error: #fa3534;
|
|
77
|
+
--u-type-error-rgb: 250, 53, 52;
|
|
52
78
|
--u-type-error-disabled: #fab6b6;
|
|
79
|
+
--u-type-error-disabled-rgb: 250, 182, 182;
|
|
53
80
|
--u-type-error-dark: #dd6161;
|
|
81
|
+
--u-type-error-dark-rgb: 221, 97, 97;
|
|
54
82
|
--u-type-error-light: #fef0f0;
|
|
83
|
+
--u-type-error-light-rgb: 254, 240, 240;
|
|
55
84
|
|
|
56
85
|
/* 信息色 */
|
|
57
86
|
--u-type-info: #909399;
|
|
87
|
+
--u-type-info-rgb: 144, 147, 153;
|
|
58
88
|
--u-type-info-disabled: #c8c9cc;
|
|
89
|
+
--u-type-info-disabled-rgb: 200, 201, 204;
|
|
59
90
|
--u-type-info-dark: #82848a;
|
|
91
|
+
--u-type-info-dark-rgb: 130, 132, 138;
|
|
60
92
|
--u-type-info-light: #f4f4f5;
|
|
93
|
+
--u-type-info-light-rgb: 244, 244, 245;
|
|
61
94
|
}
|
|
62
95
|
|
|
63
96
|
// 纯色
|