@zfqh/uview-x 0.0.7 → 0.0.8
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 +8 -0
- package/components/uv-badge/uv-badge.vue +2 -2
- package/components/uv-button/uv-button.vue +1 -1
- package/components/uv-dialog/uv-dialog.vue +2 -4
- package/components/uv-form/uv-form.vue +1 -1
- package/components/uv-line-progress/uv-line-progress.vue +1 -1
- package/components/uv-popup/uv-popup.vue +1 -2
- package/package.json +2 -2
- package/utils/config.ts +1 -1
- package/utils/function.ts +9 -2
- /package/components/uv-form/{valid.ts → validator.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.0.8](http://10.10.10.16/caoben/front-end-tools/compare/@zfqh/uview-x@0.0.7...@zfqh/uview-x@0.0.8) (2026-11-11)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @zfqh/uview-x
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [0.0.7](http://10.10.10.16/caoben/front-end-tools/compare/@zfqh/uview-x@0.0.6...@zfqh/uview-x@0.0.7) (2026-11-11)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @zfqh/uview-x
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
// top和right分为为offset的第一个和第二个值,如果没有第二个值,则right等于top
|
|
72
72
|
const top = p.offset[0]
|
|
73
73
|
const right = p.offset[1] || top
|
|
74
|
-
style.top = addUnit(top)
|
|
75
|
-
style.right = addUnit(right)
|
|
74
|
+
style.top = addUnit(top as number)
|
|
75
|
+
style.right = addUnit(right as number)
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
return style
|
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
|
|
95
95
|
<script setup lang="ts">
|
|
96
96
|
import { computed, nextTick, onMounted, ref, watch } from 'vue'
|
|
97
|
-
import { addStyle, addUnit, sys } from '../../utils/function'
|
|
98
|
-
import { deepMerge } from '../../utils/merge'
|
|
97
|
+
import { addStyle, addUnit, sys } from '../../utils/function'
|
|
98
|
+
import { deepMerge } from '../../utils/merge'
|
|
99
99
|
import props from './props'
|
|
100
100
|
import UvPopup from '../uv-popup/uv-popup.vue'
|
|
101
101
|
import UvButton from '../uv-button/uv-button.vue'
|
|
@@ -187,8 +187,6 @@
|
|
|
187
187
|
const showCancelBtn = computed(() => Boolean(cfg.value.showCancelButton))
|
|
188
188
|
const showConfirmBtn = computed(() => Boolean(cfg.value.showConfirmButton))
|
|
189
189
|
|
|
190
|
-
const addUnit = (value: string | number) => addUnit(value)
|
|
191
|
-
|
|
192
190
|
const titleAlignValue = computed(() => {
|
|
193
191
|
const map: Record<string, string> = {
|
|
194
192
|
left: 'flex-start',
|
|
@@ -13,7 +13,7 @@ import props from './props';
|
|
|
13
13
|
import { useI18n } from '../../hooks';
|
|
14
14
|
import { buildFormValidationMessages } from '../../utils/locale';
|
|
15
15
|
|
|
16
|
-
import Schema from './
|
|
16
|
+
import Schema from './validator';
|
|
17
17
|
|
|
18
18
|
// 去除警告信息
|
|
19
19
|
Schema.warning = function () {};
|
|
@@ -59,7 +59,6 @@
|
|
|
59
59
|
import { computed, onMounted, onUnmounted, ref } from 'vue'
|
|
60
60
|
import { addStyle, addUnit, error, getPx } from '../../utils/function'
|
|
61
61
|
import { deepMerge } from '../../utils/merge'
|
|
62
|
-
import { platform } from '../../utils/platform'
|
|
63
62
|
import props from './props'
|
|
64
63
|
import UvIcon from '../uv-icon/uv-icon.vue'
|
|
65
64
|
import UvOverlay from '../uv-overlay/uv-overlay.vue'
|
|
@@ -123,7 +122,7 @@
|
|
|
123
122
|
let closeTimer: any = null
|
|
124
123
|
|
|
125
124
|
const bg = computed(() => {
|
|
126
|
-
if (p.bgColor === '' || p.bgColor === 'none' ||
|
|
125
|
+
if (p.bgColor === '' || p.bgColor === 'none' || Number.parseFloat(String(p.round)) > 0) {
|
|
127
126
|
return 'transparent'
|
|
128
127
|
}
|
|
129
128
|
return p.bgColor
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zfqh/uview-x",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "uview-x:面向 uni-app x 蒸汽模式(Vapor)、经典 uni-app Vue3 与 nvue 的 UV UI 组件库,组件保持 uv-ui API。",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"README.md",
|
|
40
40
|
"CHANGELOG.md"
|
|
41
41
|
],
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "509c3ca2fb6892340866e50b172a1ea918c86319"
|
|
43
43
|
}
|
package/utils/config.ts
CHANGED
package/utils/function.ts
CHANGED
|
@@ -190,15 +190,22 @@ export function $parent(this: any, name?: string): any | false {
|
|
|
190
190
|
* 对象转字符串,或者字符串转对象
|
|
191
191
|
* @param {object | string} customStyle 需要转换的目标
|
|
192
192
|
* @param {String} target 转换的目的,object-转为对象,string-转为字符串
|
|
193
|
-
* @returns {object|string}
|
|
193
|
+
* @returns {object|string} target 为 object 时返回对象,为 string 时返回字符串
|
|
194
194
|
*/
|
|
195
|
+
export function addStyle(customStyle: string | Record<string, any>, target: 'string'): string;
|
|
196
|
+
export function addStyle(customStyle: string | Record<string, any>, target?: 'object'): Record<string, any>;
|
|
197
|
+
export function addStyle(
|
|
198
|
+
customStyle: string | Record<string, any>,
|
|
199
|
+
target: 'object' | 'string',
|
|
200
|
+
): Record<string, any> | string;
|
|
195
201
|
export function addStyle(
|
|
196
202
|
customStyle: string | Record<string, any>,
|
|
197
203
|
target: 'object' | 'string' = 'object',
|
|
198
204
|
): Record<string, any> | string {
|
|
205
|
+
// 空值按目标类型归一,保证 target=object 时始终返回对象、target=string 时始终返回字符串
|
|
206
|
+
if (empty(customStyle)) return target === 'string' ? '' : {};
|
|
199
207
|
// 字符串转字符串,对象转对象情形,直接返回
|
|
200
208
|
if (
|
|
201
|
-
empty(customStyle) ||
|
|
202
209
|
(typeof customStyle === 'object' && target === 'object') ||
|
|
203
210
|
(target === 'string' && typeof customStyle === 'string')
|
|
204
211
|
) {
|
|
File without changes
|