uview-pro 0.5.11 → 0.5.13
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 +30 -0
- package/components/u-calendar/u-calendar.vue +21 -1
- package/components/u-input/u-input.vue +7 -1
- package/components/u-tabs/types.ts +2 -0
- package/components/u-tabs/u-tabs.vue +12 -2
- package/components/u-textarea/u-textarea.vue +3 -1
- package/components/u-upload/u-upload.vue +3 -3
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -1,3 +1,33 @@
|
|
|
1
|
+
## 0.5.13(2026-03-17)
|
|
2
|
+
|
|
3
|
+
### ✨ Features | 新功能
|
|
4
|
+
|
|
5
|
+
- **u-tabs:** tabs标签组件添加徽标圆点配置功能 ([4c9fe9b](https://github.com/anyup/uView-Pro/commit/4c9fe9b36ee9f04721f53e177bea08407c5e6d11))
|
|
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))
|
|
10
|
+
|
|
11
|
+
### 👥 Contributors
|
|
12
|
+
|
|
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>
|
|
14
|
+
|
|
15
|
+
## 0.5.12(2026-03-09)
|
|
16
|
+
|
|
17
|
+
### 🐛 Bug Fixes | Bug 修复
|
|
18
|
+
|
|
19
|
+
- **u-tabs:** 延迟初始化tabs组件以确保正确获取尺寸信息,修复在App端滑块偏移问题(#139) ([90f79ff](https://github.com/anyup/uView-Pro/commit/90f79ff8f1e71a2ebc05be7d0318b8107425e09a))
|
|
20
|
+
- **u-upload:** 优化u-upload组件在暗黑模式下的显示效果 ([24955ad](https://github.com/anyup/uView-Pro/commit/24955ad947d6edc736c695f9052344a83fa191ae))
|
|
21
|
+
- **u-calendar:** 优化日历组件设置为range范围选择时,仅当开始、结束时间选择完成时才可点击确定(#136) ([4dee864](https://github.com/anyup/uView-Pro/commit/4dee864abda5e65a755aaaccbaffc430ca463cdd))
|
|
22
|
+
|
|
23
|
+
### ✨ Features | 新功能
|
|
24
|
+
|
|
25
|
+
- **demo:** 添加H5平台条件编译控制,优化组件描述文案 ([d482223](https://github.com/anyup/uView-Pro/commit/d4822234e1f0e13a6480732350f884d5034368b5))
|
|
26
|
+
|
|
27
|
+
### 👥 Contributors
|
|
28
|
+
|
|
29
|
+
<a href="https://github.com/anyup"><img src="https://github.com/anyup.png?size=40" width="40" height="40" alt="anyup" title="anyup"/></a>
|
|
30
|
+
|
|
1
31
|
## 0.5.11(2026-03-02)
|
|
2
32
|
|
|
3
33
|
### 🐛 Bug Fixes | Bug 修复
|
|
@@ -226,7 +226,13 @@
|
|
|
226
226
|
<text v-if="endDate">{{ t('uCalendar.to') }}{{ endDate }}</text>
|
|
227
227
|
</view>
|
|
228
228
|
<view class="u-calendar__bottom__btn">
|
|
229
|
-
<u-button
|
|
229
|
+
<u-button
|
|
230
|
+
:type="btnType"
|
|
231
|
+
:disabled="btnDisable"
|
|
232
|
+
shape="circle"
|
|
233
|
+
size="default"
|
|
234
|
+
@click="btnFix(false)"
|
|
235
|
+
>
|
|
230
236
|
{{ t('uCalendar.confirmText') }}
|
|
231
237
|
</u-button>
|
|
232
238
|
</view>
|
|
@@ -335,6 +341,20 @@ const popupValue = computed({
|
|
|
335
341
|
set: (val: boolean) => emit('update:modelValue', val)
|
|
336
342
|
});
|
|
337
343
|
|
|
344
|
+
const btnDisable = computed(() => {
|
|
345
|
+
let disable = false;
|
|
346
|
+
if (props.mode == 'range') {
|
|
347
|
+
if (!startDate.value || !endDate.value) {
|
|
348
|
+
disable = true;
|
|
349
|
+
}
|
|
350
|
+
} else {
|
|
351
|
+
if (!activeDate.value) {
|
|
352
|
+
disable = true;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
return disable;
|
|
356
|
+
});
|
|
357
|
+
|
|
338
358
|
watch([dataChange, lunarChange], () => {
|
|
339
359
|
init();
|
|
340
360
|
});
|
|
@@ -65,7 +65,7 @@
|
|
|
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="clearIconShow"
|
|
69
69
|
@click.stop="onClear"
|
|
70
70
|
>
|
|
71
71
|
<u-icon size="32" name="close-circle-fill" color="var(--u-light-color)" />
|
|
@@ -138,6 +138,12 @@ const inputValue = computed<string>(() => {
|
|
|
138
138
|
return String(props.modelValue);
|
|
139
139
|
});
|
|
140
140
|
|
|
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
|
+
|
|
141
147
|
// 监听 value 变化
|
|
142
148
|
watch(
|
|
143
149
|
() => inputValue.value,
|
|
@@ -39,6 +39,8 @@ export const TabsProps = {
|
|
|
39
39
|
count: { type: String, default: 'count' },
|
|
40
40
|
/** 徽标数位置偏移 */
|
|
41
41
|
offset: { type: Array as unknown as PropType<[number, number]>, default: () => [5, 20] },
|
|
42
|
+
/** 徽标是否是圆点 */
|
|
43
|
+
isDot: { type: Boolean, default: false },
|
|
42
44
|
/** 活动tab字体是否加粗 */
|
|
43
45
|
bold: { type: Boolean, default: true },
|
|
44
46
|
/** 当前活动tab item的样式 */
|
|
@@ -19,7 +19,12 @@
|
|
|
19
19
|
@tap="clickTab(index)"
|
|
20
20
|
:style="tabItemStyle(index)"
|
|
21
21
|
>
|
|
22
|
-
<u-badge
|
|
22
|
+
<u-badge
|
|
23
|
+
:count="item[count] || item['count'] || 0"
|
|
24
|
+
:offset="offset"
|
|
25
|
+
:is-dot="isDot"
|
|
26
|
+
size="mini"
|
|
27
|
+
></u-badge>
|
|
23
28
|
{{ item[name] || item['name'] }}
|
|
24
29
|
</view>
|
|
25
30
|
<view v-if="showBar" class="u-tab-bar" :style="tabBarStyle"></view>
|
|
@@ -238,7 +243,12 @@ function scrollByIndex() {
|
|
|
238
243
|
}
|
|
239
244
|
|
|
240
245
|
onMounted(() => {
|
|
241
|
-
|
|
246
|
+
nextTick(() => {
|
|
247
|
+
// 延时获取tabs的尺寸信息
|
|
248
|
+
setTimeout(() => {
|
|
249
|
+
init();
|
|
250
|
+
}, 500);
|
|
251
|
+
});
|
|
242
252
|
});
|
|
243
253
|
|
|
244
254
|
defineExpose({ init, clickTab, scrollByIndex });
|
|
@@ -53,7 +53,7 @@
|
|
|
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 && modelValue != '' && !disabled"
|
|
56
|
+
v-if="clearable && focused && modelValue != '' && !disabled"
|
|
57
57
|
>
|
|
58
58
|
<u-icon size="32" name="close-circle-fill" color="var(--u-light-color)" @click="onClear" />
|
|
59
59
|
</view>
|
|
@@ -218,6 +218,7 @@ function setFormatter(e: any) {
|
|
|
218
218
|
}
|
|
219
219
|
|
|
220
220
|
function onFocus(e: any) {
|
|
221
|
+
focused.value = true;
|
|
221
222
|
emit('focus', e);
|
|
222
223
|
}
|
|
223
224
|
|
|
@@ -225,6 +226,7 @@ function onBlur(e: any) {
|
|
|
225
226
|
setTimeout(() => {
|
|
226
227
|
e.detail.value = innerValue.value;
|
|
227
228
|
let value = e.detail.value;
|
|
229
|
+
focused.value = false;
|
|
228
230
|
emit('blur', e);
|
|
229
231
|
emitToParent('onFormBlur', value);
|
|
230
232
|
}, 40);
|
|
@@ -494,7 +494,7 @@ defineExpose({ clear, reUpload, selectFile, upload, retry, remove, doPreviewImag
|
|
|
494
494
|
height: 200rpx;
|
|
495
495
|
overflow: hidden;
|
|
496
496
|
margin: 10rpx;
|
|
497
|
-
background:
|
|
497
|
+
background: var(--u-bg-gray-light);
|
|
498
498
|
position: relative;
|
|
499
499
|
border-radius: 10rpx;
|
|
500
500
|
/* #ifndef APP-NVUE */
|
|
@@ -505,7 +505,7 @@ defineExpose({ clear, reUpload, selectFile, upload, retry, remove, doPreviewImag
|
|
|
505
505
|
}
|
|
506
506
|
|
|
507
507
|
.u-preview-wrap {
|
|
508
|
-
border: 1px solid
|
|
508
|
+
border: 1px solid var(--u-border-color);
|
|
509
509
|
}
|
|
510
510
|
|
|
511
511
|
.u-add-wrap {
|
|
@@ -520,7 +520,7 @@ defineExpose({ clear, reUpload, selectFile, upload, retry, remove, doPreviewImag
|
|
|
520
520
|
}
|
|
521
521
|
|
|
522
522
|
.u-add-wrap__hover {
|
|
523
|
-
background-color:
|
|
523
|
+
background-color: var(--u-bg-gray-light);
|
|
524
524
|
}
|
|
525
525
|
|
|
526
526
|
.u-preview-image {
|
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.13",
|
|
6
6
|
"description": "uView Pro是基于Vue3+TS的多平台UI框架,提供80+高质量组件、便捷工具和常用模板,支持多主题、暗黑模式、多语言,支持H5/APP/鸿蒙/小程序多端开发。已在鸿蒙应用商店上架,欢迎体验!",
|
|
7
7
|
"main": "index.ts",
|
|
8
8
|
"module": "index.ts",
|