uview-pro 0.5.13 → 0.5.15
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 +42 -7
- package/components/u-form-item/types.ts +10 -0
- package/components/u-form-item/u-form-item.vue +26 -7
- package/components/u-input/u-input.vue +2 -7
- package/components/u-textarea/u-textarea.vue +2 -1
- package/components/u-toast/u-toast.vue +1 -1
- package/libs/css/common.scss +5 -0
- package/package.json +1 -1
- package/readme.md +2 -0
- package/types/global.d.ts +1 -0
package/changelog.md
CHANGED
|
@@ -1,17 +1,52 @@
|
|
|
1
|
-
## 0.5.
|
|
1
|
+
## 0.5.15(2026-03-25)
|
|
2
|
+
|
|
3
|
+
### 🐛 Bug Fixes | Bug 修复
|
|
4
|
+
|
|
5
|
+
- **u-form:** 修复表单项底部边框默认值逻辑 ([d939fbd](https://github.com/anyup/uView-Pro/commit/d939fbd5df85c266f8a8f5e23ebeca251eee94ec))
|
|
6
|
+
- **u-input:** 修复u-input输入框在某些微信小程序平台下,重新获取焦点时会清空输入框的问题 ([cedecfa](https://github.com/anyup/uView-Pro/commit/cedecfa4bf2142046bb512b1d9e87f6c9d77516d))
|
|
7
|
+
- **demo:** 优化微信小程序首页u-sticky使用配置 ([cc4e9ac](https://github.com/anyup/uView-Pro/commit/cc4e9ac9f022e7713b2eb2746038a8481729c0b4))
|
|
2
8
|
|
|
3
9
|
### ✨ Features | 新功能
|
|
4
10
|
|
|
5
|
-
- **
|
|
6
|
-
- **u-input:** 优化输入框清除图标显示控制逻辑(#141) ([e08bc10](https://github.com/anyup/uView-Pro/commit/e08bc10ffe81945b09f1afc50e273588b346c9d8))
|
|
7
|
-
- **u-textarea:** 优化textarea清空按钮显示逻辑(#141) ([feab6cf](https://github.com/anyup/uView-Pro/commit/feab6cf55c17e655b7a89b9f748ef814b5ff8472))
|
|
8
|
-
- **demo:** 优化微信小程序声明显示条件 ([72a5cd2](https://github.com/anyup/uView-Pro/commit/72a5cd2503bf90e99a9b7379703e7dce284896cc))
|
|
9
|
-
- **toast:** 调整toast组件配置并添加回调功能 ([e9f697f](https://github.com/anyup/uView-Pro/commit/e9f697f58c6cc207bc4df3c16203565762cb860e))
|
|
11
|
+
- **types:** 添加昵称输入类型支持 ([bd15170](https://github.com/anyup/uView-Pro/commit/bd15170d0ccc76098debb9e37b4acfbe43fef043))
|
|
10
12
|
|
|
11
13
|
### 👥 Contributors
|
|
12
14
|
|
|
13
|
-
<a href="https://github.com/anyup"><img src="https://github.com/anyup.png?size=40" width="40" height="40" alt="anyup" title="anyup"/></a>
|
|
15
|
+
<a href="https://github.com/anyup"><img src="https://github.com/anyup.png?size=40" width="40" height="40" alt="anyup" title="anyup"/></a> <a href="https://github.com/xaunseus"><img src="https://github.com/xaunseus.png?size=40" width="40" height="40" alt="xaunseus" title="xaunseus"/></a>
|
|
14
16
|
|
|
17
|
+
## 0.5.14(2026-03-23)
|
|
18
|
+
|
|
19
|
+
### 🐛 Bug Fixes | Bug 修复
|
|
20
|
+
|
|
21
|
+
- **u-toast:** 调整提示框位置和边框样式 ([093e31a](https://github.com/anyup/uView-Pro/commit/093e31a34a26902ced26ac841ddfa738fa796528))
|
|
22
|
+
- **u-form:** 修复表单项错误消息样式显示问题 ([462eb6e](https://github.com/anyup/uView-Pro/commit/462eb6e9e3b4d676ac97877327d93705f53400a5))
|
|
23
|
+
|
|
24
|
+
### 📝 Documentation | 文档
|
|
25
|
+
|
|
26
|
+
- **readme:** 添加快速启动模板链接 ([afce866](https://github.com/anyup/uView-Pro/commit/afce866f0e7e20b97132bebcbaf56f9aafc25c5c))
|
|
27
|
+
|
|
28
|
+
### ✨ Features | 新功能
|
|
29
|
+
|
|
30
|
+
- **u-form-item:** 增加前后图标前缀自定义配置和插槽支持 ([9f32cf7](https://github.com/anyup/uView-Pro/commit/9f32cf7f32e0697ab6771711bc96bc2d8395c597))
|
|
31
|
+
|
|
32
|
+
### 👥 Contributors
|
|
33
|
+
|
|
34
|
+
<a href="https://github.com/anyup"><img src="https://github.com/anyup.png?size=40" width="40" height="40" alt="anyup" title="anyup"/></a>
|
|
35
|
+
|
|
36
|
+
## 0.5.13(2026-03-17)
|
|
37
|
+
|
|
38
|
+
### ✨ Features | 新功能
|
|
39
|
+
|
|
40
|
+
- **u-tabs:** tabs标签组件添加徽标圆点配置功能 ([4c9fe9b](https://github.com/anyup/uView-Pro/commit/4c9fe9b36ee9f04721f53e177bea08407c5e6d11))
|
|
41
|
+
- **u-input:** 优化输入框清除图标显示控制逻辑(#141) ([e08bc10](https://github.com/anyup/uView-Pro/commit/e08bc10ffe81945b09f1afc50e273588b346c9d8))
|
|
42
|
+
- **u-textarea:** 优化textarea清空按钮显示逻辑(#141) ([feab6cf](https://github.com/anyup/uView-Pro/commit/feab6cf55c17e655b7a89b9f748ef814b5ff8472))
|
|
43
|
+
- **demo:** 优化微信小程序声明显示条件 ([72a5cd2](https://github.com/anyup/uView-Pro/commit/72a5cd2503bf90e99a9b7379703e7dce284896cc))
|
|
44
|
+
- **toast:** 调整toast组件配置并添加回调功能 ([e9f697f](https://github.com/anyup/uView-Pro/commit/e9f697f58c6cc207bc4df3c16203565762cb860e))
|
|
45
|
+
|
|
46
|
+
### 👥 Contributors
|
|
47
|
+
|
|
48
|
+
<a href="https://github.com/anyup"><img src="https://github.com/anyup.png?size=40" width="40" height="40" alt="anyup" title="anyup"/></a>
|
|
49
|
+
|
|
15
50
|
## 0.5.12(2026-03-09)
|
|
16
51
|
|
|
17
52
|
### 🐛 Bug Fixes | Bug 修复
|
|
@@ -52,6 +52,16 @@ export const FormItemProps = {
|
|
|
52
52
|
type: String,
|
|
53
53
|
default: ''
|
|
54
54
|
},
|
|
55
|
+
/** 左侧图标的自定义前缀 */
|
|
56
|
+
leftIconPrefix: {
|
|
57
|
+
type: String,
|
|
58
|
+
default: 'uicon'
|
|
59
|
+
},
|
|
60
|
+
/** 右侧图标的自定义前缀 */
|
|
61
|
+
rightIconPrefix: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: 'uicon'
|
|
64
|
+
},
|
|
55
65
|
/** 左侧图标的样式 */
|
|
56
66
|
leftIconStyle: {
|
|
57
67
|
type: Object as PropType<Record<string, any>>,
|
|
@@ -27,11 +27,20 @@
|
|
|
27
27
|
}"
|
|
28
28
|
>
|
|
29
29
|
<!-- 为了块对齐 -->
|
|
30
|
-
<view
|
|
30
|
+
<view
|
|
31
|
+
v-if="required || leftIcon || label || $slots.label || $slots.leftIcon"
|
|
32
|
+
class="u-form-item--left__content"
|
|
33
|
+
>
|
|
31
34
|
<!-- nvue不支持伪元素before -->
|
|
32
35
|
<text v-if="required" class="u-form-item--left__content--required">*</text>
|
|
33
|
-
<view class="u-form-item--left__content__icon" v-if="leftIcon">
|
|
34
|
-
<
|
|
36
|
+
<view class="u-form-item--left__content__icon" v-if="leftIcon || $slots.leftIcon">
|
|
37
|
+
<slot name="leftIcon">
|
|
38
|
+
<u-icon
|
|
39
|
+
:custom-prefix="leftIconPrefix"
|
|
40
|
+
:name="leftIcon"
|
|
41
|
+
:custom-style="leftIconStyle"
|
|
42
|
+
></u-icon>
|
|
43
|
+
</slot>
|
|
35
44
|
</view>
|
|
36
45
|
<view
|
|
37
46
|
class="u-form-item--left__content__label"
|
|
@@ -58,8 +67,18 @@
|
|
|
58
67
|
<view class="u-form-item--right__content__slot">
|
|
59
68
|
<slot />
|
|
60
69
|
</view>
|
|
61
|
-
<view
|
|
62
|
-
|
|
70
|
+
<view
|
|
71
|
+
class="u-form-item--right__content__icon u-flex"
|
|
72
|
+
v-if="$slots.right || $slots.rightIcon || rightIcon"
|
|
73
|
+
>
|
|
74
|
+
<slot name="rightIcon">
|
|
75
|
+
<u-icon
|
|
76
|
+
v-if="rightIcon"
|
|
77
|
+
:name="rightIcon"
|
|
78
|
+
:custom-prefix="rightIconPrefix"
|
|
79
|
+
:custom-style="rightIconStyle"
|
|
80
|
+
></u-icon>
|
|
81
|
+
</slot>
|
|
63
82
|
<slot name="right" />
|
|
64
83
|
</view>
|
|
65
84
|
</view>
|
|
@@ -69,7 +88,7 @@
|
|
|
69
88
|
class="u-form-item__message"
|
|
70
89
|
v-if="validateState === 'error' && showError('message')"
|
|
71
90
|
:style="{
|
|
72
|
-
paddingLeft: elLabelPosition == 'left' ? $u.addUnit(elLabelWidth) : '0'
|
|
91
|
+
paddingLeft: elLabelPosition == 'left' && label ? $u.addUnit(elLabelWidth) : '0'
|
|
73
92
|
}"
|
|
74
93
|
>{{ validateMessage }}</view
|
|
75
94
|
>
|
|
@@ -214,7 +233,7 @@ const elBorderBottom = computed(() => {
|
|
|
214
233
|
? props.borderBottom
|
|
215
234
|
: parentData.value.borderBottom
|
|
216
235
|
? parentData.value.borderBottom
|
|
217
|
-
:
|
|
236
|
+
: false;
|
|
218
237
|
});
|
|
219
238
|
|
|
220
239
|
// 事件派发/广播工具
|
|
@@ -65,7 +65,8 @@
|
|
|
65
65
|
<view class="u-input__right-icon u-flex">
|
|
66
66
|
<view
|
|
67
67
|
class="u-input__right-icon__clear u-input__right-icon__item"
|
|
68
|
-
v-if="
|
|
68
|
+
v-if="clearable && inputValue !== '' && !disabled"
|
|
69
|
+
:class="{ 'u-hidden': !focused && type !== 'select' }"
|
|
69
70
|
@click.stop="onClear"
|
|
70
71
|
>
|
|
71
72
|
<u-icon size="32" name="close-circle-fill" color="var(--u-light-color)" />
|
|
@@ -138,12 +139,6 @@ const inputValue = computed<string>(() => {
|
|
|
138
139
|
return String(props.modelValue);
|
|
139
140
|
});
|
|
140
141
|
|
|
141
|
-
// 清除图标是否显示
|
|
142
|
-
const clearIconShow = computed(() => {
|
|
143
|
-
if (props.type === 'select') return props.clearable && inputValue.value !== '' && !props.disabled;
|
|
144
|
-
return props.clearable && focused.value && inputValue.value !== '' && !props.disabled;
|
|
145
|
-
});
|
|
146
|
-
|
|
147
142
|
// 监听 value 变化
|
|
148
143
|
watch(
|
|
149
144
|
() => inputValue.value,
|
|
@@ -53,7 +53,8 @@
|
|
|
53
53
|
<view class="u-textarea__right-icon u-flex">
|
|
54
54
|
<view
|
|
55
55
|
class="u-textarea__right-icon__clear u-textarea__right-icon__item"
|
|
56
|
-
v-if="clearable &&
|
|
56
|
+
v-if="clearable && modelValue != '' && !disabled"
|
|
57
|
+
:class="{ 'u-hidden': !focused }"
|
|
57
58
|
>
|
|
58
59
|
<u-icon size="32" name="close-circle-fill" color="var(--u-light-color)" @click="onClear" />
|
|
59
60
|
</view>
|
package/libs/css/common.scss
CHANGED
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.5.
|
|
5
|
+
"version": "0.5.15",
|
|
6
6
|
"description": "uView Pro是基于Vue3+TS的多平台UI框架,提供80+高质量组件、便捷工具和常用模板,支持多主题、暗黑模式、多语言,支持H5/APP/鸿蒙/小程序多端开发。已在鸿蒙应用商店上架,欢迎体验!",
|
|
7
7
|
"main": "index.ts",
|
|
8
8
|
"module": "index.ts",
|
package/readme.md
CHANGED