@zfqh/uview-x 0.0.7 → 0.0.9
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/README.md +4 -1
- 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 +4 -5
- package/utils/config.ts +0 -1
- package/utils/function.ts +9 -2
- package/CHANGELOG.md +0 -62
- package/LICENSE +0 -21
- /package/components/uv-form/{valid.ts → validator.ts} +0 -0
package/README.md
CHANGED
|
@@ -122,5 +122,8 @@ import { Request, dayjs } from '@zfqh/uview-x/libs';
|
|
|
122
122
|
|
|
123
123
|
- 开发约定、组件清单、完整 API、平台差异与验证:[AGENTS.md](AGENTS.md)
|
|
124
124
|
- 示例工程:`examples/uview-vapor`(蒸汽模式)、`examples/uview-nvue`(nvue)
|
|
125
|
-
- 变更记录:[CHANGELOG.md](CHANGELOG.md)
|
|
126
125
|
- 参考:[uni-app x 蒸汽模式](https://doc.dcloud.net.cn/uni-app-x/app-vapor.html) · [uv-ui 官方文档](https://www.uvui.cn)
|
|
126
|
+
|
|
127
|
+
## 许可
|
|
128
|
+
|
|
129
|
+
本包为公司内部私有代码(`license: UNLICENSED`),使用与分发需获得书面许可;其中来源于 uv-ui 的部分遵循 MIT License,详见 [NOTICE](NOTICE)。
|
|
@@ -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.9",
|
|
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",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"蒸汽模式"
|
|
27
27
|
],
|
|
28
28
|
"author": "yinjiazeng@163.com",
|
|
29
|
-
"license": "
|
|
29
|
+
"license": "UNLICENSED",
|
|
30
30
|
"files": [
|
|
31
31
|
"components",
|
|
32
32
|
"hooks",
|
|
@@ -36,8 +36,7 @@
|
|
|
36
36
|
"types",
|
|
37
37
|
"utils",
|
|
38
38
|
"index.ts",
|
|
39
|
-
"README.md"
|
|
40
|
-
"CHANGELOG.md"
|
|
39
|
+
"README.md"
|
|
41
40
|
],
|
|
42
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "5dbc4d414ca9c84f7b65abbf92f8ce0f3750a1f3"
|
|
43
42
|
}
|
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
|
) {
|
package/CHANGELOG.md
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
## [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
|
-
|
|
8
|
-
**Note:** Version bump only for package @zfqh/uview-x
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## [0.0.6](http://10.10.10.16/caoben/front-end-tools/compare/@zfqh/uview-x@0.0.5...@zfqh/uview-x@0.0.6) (2026-11-11)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @zfqh/uview-x
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
## [0.0.5](http://10.10.10.16/caoben/front-end-tools/compare/@zfqh/uview-x@0.0.4...@zfqh/uview-x@0.0.5) (2026-11-11)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
### Bug Fixes
|
|
26
|
-
|
|
27
|
-
* 国际化问题优化 ([b2dda3c](http://10.10.10.16/caoben/front-end-tools/commits/b2dda3c0b9ff45a42bf777db3bddf6f06c5d7e57))
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
## [0.0.4](http://10.10.10.16/caoben/front-end-tools/compare/@zfqh/uview-x@0.0.3...@zfqh/uview-x@0.0.4) (2026-11-10)
|
|
34
|
-
|
|
35
|
-
**Note:** Version bump only for package @zfqh/uview-x
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
## [0.0.3](http://10.10.10.16/caoben/front-end-tools/compare/@zfqh/uview-x@0.0.2...@zfqh/uview-x@0.0.3) (2026-11-10)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
### Bug Fixes
|
|
45
|
-
|
|
46
|
-
* 文本框输入过快光标乱跳 ([fdf27f9](http://10.10.10.16/caoben/front-end-tools/commits/fdf27f9c37cde6941af3e8dd2db0c708816d3a2f))
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
## [0.0.2](http://10.10.10.16/caoben/front-end-tools/compare/@zfqh/uview-x@0.0.1...@zfqh/uview-x@0.0.2) (2026-11-09)
|
|
53
|
-
|
|
54
|
-
**Note:** Version bump only for package @zfqh/uview-x
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
## 0.0.1 (2026-11-09)
|
|
61
|
-
|
|
62
|
-
**Note:** Version bump only for package @zfqh/uview-x
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024 aniu
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
File without changes
|