@wot-ui/ui 2.0.0-alpha.3 → 2.0.0-alpha.5
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 +1 -1
- package/changelog.md +21 -0
- package/components/wd-cascader/types.ts +2 -2
- package/components/wd-config-provider/types.ts +3 -4
- package/components/wd-form/index.ts +2 -0
- package/components/wd-form/types.ts +8 -22
- package/components/wd-notify/index.scss +1 -1
- package/components/wd-select-picker/index.scss +6 -0
- package/components/wd-select-picker/wd-select-picker.vue +2 -2
- package/composables/index.ts +4 -0
- package/index.ts +2 -7
- package/package.json +1 -1
- package/web-types.json +1 -1
package/README.md
CHANGED
|
@@ -131,4 +131,4 @@
|
|
|
131
131
|
本项目基于 [MIT](https://zh.wikipedia.org/wiki/MIT%E8%A8%B1%E5%8F%AF%E8%AD%89) 协议,请自由地享受和参与开源。
|
|
132
132
|
|
|
133
133
|
|
|
134
|
-
[](https://www.star-history.com/?type=date&repos=wot-ui%2Fwot-ui)
|
package/changelog.md
CHANGED
|
@@ -1,6 +1,27 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## [2.0.0-alpha.5](https://github.com/wot-ui/wot-ui/compare/v2.0.0-alpha.4...v2.0.0-alpha.5) (2026-04-08)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
### ✨ Features | 新功能
|
|
8
|
+
|
|
9
|
+
* ✨ WIP ([4aaab9b](https://github.com/wot-ui/wot-ui/commit/4aaab9b311677933c0f9fe800649aecb0ea8088c))
|
|
10
|
+
* ✨ WIP ([fa64e4f](https://github.com/wot-ui/wot-ui/commit/fa64e4f2f2d3049b85322883e63fdb968fde9cfa))
|
|
11
|
+
* ✨ WIP ([96ad504](https://github.com/wot-ui/wot-ui/commit/96ad5040c2b56b648007a76d956c8604890d291c))
|
|
12
|
+
* ✨ WIP ([4c0be9a](https://github.com/wot-ui/wot-ui/commit/4c0be9a08472390be77cd6eec7987b57e6e1c35a))
|
|
13
|
+
* ✨ WIP ([50a0e03](https://github.com/wot-ui/wot-ui/commit/50a0e03cb9f9b9873e456fd212a0053c233c6d8a))
|
|
14
|
+
|
|
15
|
+
## [2.0.0-alpha.4](https://github.com/wot-ui/wot-ui/compare/v2.0.0-alpha.3...v2.0.0-alpha.4) (2026-04-07)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### ✨ Features | 新功能
|
|
19
|
+
|
|
20
|
+
* ✨ WIP ([a1de9b1](https://github.com/wot-ui/wot-ui/commit/a1de9b16c441163d7f176f2e39619efc6eb3b8be))
|
|
21
|
+
* ✨ WIP ([4a1a4c9](https://github.com/wot-ui/wot-ui/commit/4a1a4c97fba796ab5c270c91800b7ea43e2736c6))
|
|
22
|
+
* ✨ WIP ([72d3d60](https://github.com/wot-ui/wot-ui/commit/72d3d60f8fb4e00d2979b9113194c5fc78936f98))
|
|
23
|
+
* ✨ WIP ([124bd88](https://github.com/wot-ui/wot-ui/commit/124bd886b1df4db98a1f206b7d64784140524c93))
|
|
24
|
+
|
|
4
25
|
## [2.0.0-alpha.3](https://github.com/wot-ui/wot-ui/compare/v2.0.0-alpha.2...v2.0.0-alpha.3) (2026-04-06)
|
|
5
26
|
|
|
6
27
|
|
|
@@ -7,9 +7,9 @@ import { type TabsLineTheme } from '../wd-tabs/types'
|
|
|
7
7
|
*/
|
|
8
8
|
export type CascaderOption = {
|
|
9
9
|
/** 选项值 */
|
|
10
|
-
value
|
|
10
|
+
value?: string | number
|
|
11
11
|
/** 选项文本 */
|
|
12
|
-
text
|
|
12
|
+
text?: string
|
|
13
13
|
/** 子选项 */
|
|
14
14
|
children?: CascaderOption[]
|
|
15
15
|
/** 是否禁用 */
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import type { ExtractPropTypes, PropType, InjectionKey, ComputedRef } from 'vue'
|
|
2
|
-
import { makeStringProp, baseProps } from '
|
|
3
|
-
|
|
4
|
-
export type ConfigProviderTheme = 'light' | 'dark' | ''
|
|
2
|
+
import { makeStringProp, baseProps } from '../../common/props'
|
|
5
3
|
|
|
6
4
|
export const configProviderProps = {
|
|
7
5
|
...baseProps,
|
|
8
6
|
/**
|
|
9
7
|
* 主题风格,设置为 dark 来开启深色模式,全局生效
|
|
10
8
|
*/
|
|
11
|
-
theme: makeStringProp
|
|
9
|
+
theme: makeStringProp('light'),
|
|
12
10
|
/**
|
|
13
11
|
* 自定义主题变量
|
|
14
12
|
*/
|
|
@@ -1478,6 +1476,7 @@ export type selectPickerThemeVars = {
|
|
|
1478
1476
|
selectPickerBg?: string // 选择器背景色
|
|
1479
1477
|
selectPickerFooterBorderColor?: string // 确认区域上边框颜色
|
|
1480
1478
|
selectPickerFooterPadding?: string // 底部内边距
|
|
1479
|
+
selectPickerItemPadding?: string // 选项内边距
|
|
1481
1480
|
selectPickerLoadingIconSize?: string // loading 图标尺寸
|
|
1482
1481
|
selectPickerLoadingOpacity?: string // loading 状态下透明度
|
|
1483
1482
|
selectPickerTextActiveColor?: string // 选中态文字颜色
|
|
@@ -18,28 +18,6 @@ export type FormValidateEvent = (typeof FORM_VALIDATE_EVENTS)[number]
|
|
|
18
18
|
|
|
19
19
|
export type FormValidateTrigger = FormValidateEvent
|
|
20
20
|
|
|
21
|
-
export type FormProvide = {
|
|
22
|
-
props: {
|
|
23
|
-
model: Record<string, any>
|
|
24
|
-
schema?: FormSchema
|
|
25
|
-
validateTrigger?: FormValidateTrigger | FormValidateTrigger[]
|
|
26
|
-
border?: boolean
|
|
27
|
-
// 公共配置属性
|
|
28
|
-
center?: boolean
|
|
29
|
-
size?: CellSize
|
|
30
|
-
titleWidth?: string | number
|
|
31
|
-
layout?: CellLayout
|
|
32
|
-
valueAlign?: CellValueAlign
|
|
33
|
-
asteriskPosition?: CellAsteriskPosition
|
|
34
|
-
hideAsterisk?: boolean
|
|
35
|
-
ellipsis?: boolean
|
|
36
|
-
}
|
|
37
|
-
errorMessages?: Record<string, string>
|
|
38
|
-
validate?: (prop?: string | string[]) => Promise<{ valid: boolean; errors: ErrorMessage[] }>
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export const FORM_KEY: InjectionKey<FormProvide> = Symbol('wd-form')
|
|
42
|
-
|
|
43
21
|
export type ErrorMessage = {
|
|
44
22
|
prop: string
|
|
45
23
|
message: string
|
|
@@ -144,4 +122,12 @@ export type FormExpose = {
|
|
|
144
122
|
reset: () => void
|
|
145
123
|
}
|
|
146
124
|
|
|
125
|
+
export type FormProvide = {
|
|
126
|
+
props: Partial<FormProps>
|
|
127
|
+
errorMessages?: Record<string, string>
|
|
128
|
+
validate?: (prop?: string | string[]) => Promise<{ valid: boolean; errors: ErrorMessage[] }>
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export const FORM_KEY: InjectionKey<FormProvide> = Symbol('wd-form')
|
|
132
|
+
|
|
147
133
|
export type FormInstance = ComponentPublicInstance<FormProps, FormExpose>
|
|
@@ -31,7 +31,7 @@ $notify-icon-size: var(--wot-notify-icon-size, $n-18) !default;
|
|
|
31
31
|
// 图标间距
|
|
32
32
|
$notify-icon-spacing: var(--wot-notify-icon-spacing, $spacing-tight) !default;
|
|
33
33
|
// floating 变体背景色
|
|
34
|
-
$notify-floating-bg: var(--wot-notify-floating-bg, $
|
|
34
|
+
$notify-floating-bg: var(--wot-notify-floating-bg, $filled-oppo) !default;
|
|
35
35
|
// floating 变体文字颜色
|
|
36
36
|
$notify-floating-color: var(--wot-notify-floating-color, $text-main) !default;
|
|
37
37
|
// floating 变体圆角
|
|
@@ -17,6 +17,8 @@ $select-picker-text-active-color: var(--wot-select-picker-text-active-color, $pr
|
|
|
17
17
|
$select-picker-footer-padding: var(--wot-select-picker-footer-padding, $padding-tight $padding-loose) !default;
|
|
18
18
|
// 确认区域上边框颜色
|
|
19
19
|
$select-picker-footer-border-color: var(--wot-select-picker-footer-border-color, $border-light) !default;
|
|
20
|
+
// 选项内边距
|
|
21
|
+
$select-picker-item-padding: var(--wot-select-picker-item-padding, $padding-extra-loose $padding-zero) !default;
|
|
20
22
|
|
|
21
23
|
@include b(select-picker) {
|
|
22
24
|
@include e(loading) {
|
|
@@ -59,6 +61,10 @@ $select-picker-footer-border-color: var(--wot-select-picker-footer-border-color,
|
|
|
59
61
|
color: $select-picker-text-active-color;
|
|
60
62
|
}
|
|
61
63
|
|
|
64
|
+
@include e(checkbox-item,radio-item) {
|
|
65
|
+
padding: $select-picker-item-padding;
|
|
66
|
+
}
|
|
67
|
+
|
|
62
68
|
@include edeep(radio-label,checkbox-label) {
|
|
63
69
|
@include lineEllipsis;
|
|
64
70
|
}
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
placement="right"
|
|
38
38
|
@change="handleChange"
|
|
39
39
|
>
|
|
40
|
-
<view v-for="item in filterColumns" :key="item[valueKey]" :id="'check' + item[valueKey]">
|
|
40
|
+
<view v-for="item in filterColumns" :key="item[valueKey]" :id="'check' + item[valueKey]" class="wd-select-picker__checkbox-item">
|
|
41
41
|
<wd-checkbox :name="item[valueKey]" :disabled="item.disabled" custom-label-class="wd-select-picker__checkbox-label">
|
|
42
42
|
<block v-if="showHighlightText">
|
|
43
43
|
<block v-for="text in item[labelKey]" :key="text.label">
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
type="dot"
|
|
64
64
|
@change="handleChange"
|
|
65
65
|
>
|
|
66
|
-
<view v-for="(item, index) in filterColumns" :key="index" :id="'radio' + item[valueKey]">
|
|
66
|
+
<view v-for="(item, index) in filterColumns" :key="index" :id="'radio' + item[valueKey]" class="wd-select-picker__radio-item">
|
|
67
67
|
<wd-radio :value="item[valueKey]" :disabled="item.disabled" custom-label-class="wd-select-picker__radio-label">
|
|
68
68
|
<block v-if="showHighlightText">
|
|
69
69
|
<block v-for="text in item[labelKey]" :key="text.label">
|
package/composables/index.ts
CHANGED
|
@@ -10,3 +10,7 @@ export { useTouch } from './useTouch'
|
|
|
10
10
|
export { useTranslate } from './useTranslate'
|
|
11
11
|
export { useUpload } from './useUpload'
|
|
12
12
|
export { useConfigProvider } from './useConfigProvider'
|
|
13
|
+
export { useToast } from '../components/wd-toast'
|
|
14
|
+
export { useDialog } from '../components/wd-dialog'
|
|
15
|
+
export { useImagePreview } from '../components/wd-image-preview'
|
|
16
|
+
export { useNotify, setNotifyDefaultOptions, resetNotifyDefaultOptions } from '../components/wd-notify'
|
package/index.ts
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
export { useToast } from './components/wd-toast'
|
|
2
|
-
export { useDialog } from './components/wd-dialog'
|
|
3
|
-
export { useImagePreview } from './components/wd-image-preview'
|
|
4
1
|
export * from './composables'
|
|
5
|
-
export
|
|
6
|
-
export {
|
|
7
|
-
export type { FormSchema, FormSchemaIssue } from './components/wd-form/types'
|
|
8
|
-
|
|
2
|
+
export { zodAdapter } from './components/wd-form'
|
|
3
|
+
export type { FormSchema, FormSchemaIssue, FormValidateEvent, FormValidateTrigger } from './components/wd-form'
|
|
9
4
|
export * as CommonUtil from './common/util'
|
|
10
5
|
export * from './locale'
|
|
11
6
|
export type { ConfigProviderThemeVars } from './components/wd-config-provider/types'
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"wot-ui","name":"@wot-ui/ui","displayName":"wot-ui 一个轻量、美观、AI友好的 uni-app 组件库","version":"2.0.0-alpha.
|
|
1
|
+
{"id":"wot-ui","name":"@wot-ui/ui","displayName":"wot-ui 一个轻量、美观、AI友好的 uni-app 组件库","version":"2.0.0-alpha.5","license":"MIT","description":"一个基于Vue3+TS开发的uni-app组件库,提供70+高质量组件,支持暗黑模式、国际化和自定义主题。","keywords":["wot-ui","国际化","组件库","vue3","暗黑模式"],"main":"index.ts","repository":{"type":"git","url":"https://github.com/wot-ui/wot-ui.git"},"engines":{"HBuilderX":"^3.8.7"},"dcloudext":{"type":"component-vue","sale":{"regular":{"price":"0.00"},"sourcecode":{"price":"0.00"}},"contact":{"qq":""},"declaration":{"ads":"无","data":"插件不采集任何数据","permissions":"无"},"npmurl":"https://www.npmjs.com/package/@wot-ui/ui"},"vetur":{"tags":"tags.json","attributes":"attributes.json"},"web-types":"web-types.json","uni_modules":{"dependencies":[],"encrypt":[],"platforms":{"cloud":{"tcb":"y","aliyun":"y","alipay":"n"},"client":{"Vue":{"vue2":"n","vue3":"y"},"App":{"app-vue":"y","app-nvue":"n","app-uvue":"n"},"H5-mobile":{"Safari":"y","Android Browser":"y","微信浏览器(Android)":"y","QQ浏览器(Android)":"y"},"H5-pc":{"Chrome":"y","IE":"u","Edge":"y","Firefox":"y","Safari":"y"},"小程序":{"微信":"y","阿里":"y","百度":"u","字节跳动":"u","QQ":"y","钉钉":"y","快手":"u","飞书":"u","京东":"u"},"快应用":{"华为":"u","联盟":"u"}}}},"peerDependencies":{"vue":">=3.2.47"}}
|