@wot-ui/ui 2.0.0-alpha.3 → 2.0.0-alpha.4
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 +10 -0
- package/components/wd-config-provider/types.ts +2 -4
- package/components/wd-form/index.ts +2 -0
- package/components/wd-form/types.ts +8 -22
- package/composables/index.ts +4 -0
- package/index.ts +2 -7
- package/package.json +1 -1
- package/web-types.json +1 -1
package/changelog.md
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## [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)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
### ✨ Features | 新功能
|
|
8
|
+
|
|
9
|
+
* ✨ WIP ([a1de9b1](https://github.com/wot-ui/wot-ui/commit/a1de9b16c441163d7f176f2e39619efc6eb3b8be))
|
|
10
|
+
* ✨ WIP ([4a1a4c9](https://github.com/wot-ui/wot-ui/commit/4a1a4c97fba796ab5c270c91800b7ea43e2736c6))
|
|
11
|
+
* ✨ WIP ([72d3d60](https://github.com/wot-ui/wot-ui/commit/72d3d60f8fb4e00d2979b9113194c5fc78936f98))
|
|
12
|
+
* ✨ WIP ([124bd88](https://github.com/wot-ui/wot-ui/commit/124bd886b1df4db98a1f206b7d64784140524c93))
|
|
13
|
+
|
|
4
14
|
## [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
15
|
|
|
6
16
|
|
|
@@ -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
|
*/
|
|
@@ -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>
|
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.4","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"}}
|