diff --git a/packages/varlet-ui/docs/zodValidation.en-US.md b/packages/varlet-ui/docs/zodValidation.en-US.md index b476dd36dce..5667b616089 100644 --- a/packages/varlet-ui/docs/zodValidation.en-US.md +++ b/packages/varlet-ui/docs/zodValidation.en-US.md @@ -10,7 +10,14 @@ We support form validation based on [Zod](https://zod.dev/) in `3.5.0+`. In order to control the size of the component library, we do not build-in `Zod`, so you need to install it manually. ```shell -pnpm i zod +# npm +npm i zod -S + +# yarn +yarn add zod + +# pnpm +pnpm add zod ``` ### Basic Usage @@ -67,7 +74,7 @@ function handleSubmit(valid) { ``` -### Use with Typescript +### Use With Typescript If you use `Typescript`, define a `Zod Schema` to get both Typescript types and form rules. diff --git a/packages/varlet-ui/docs/zodValidation.zh-CN.md b/packages/varlet-ui/docs/zodValidation.zh-CN.md index f94ed76d003..7009e6d4048 100644 --- a/packages/varlet-ui/docs/zodValidation.zh-CN.md +++ b/packages/varlet-ui/docs/zodValidation.zh-CN.md @@ -9,7 +9,14 @@ 为了控制组件库的尺寸,我们不内置 `Zod`,所以需要手动安装。 ```shell -pnpm i zod +# npm +npm i zod -S + +# yarn +yarn add zod + +# pnpm +pnpm add zod ``` ### 基本使用 diff --git a/packages/varlet-ui/src/auto-complete/docs/zh-CN.md b/packages/varlet-ui/src/auto-complete/docs/zh-CN.md index 4e527a76de8..abf64462d34 100644 --- a/packages/varlet-ui/src/auto-complete/docs/zh-CN.md +++ b/packages/varlet-ui/src/auto-complete/docs/zh-CN.md @@ -248,7 +248,7 @@ function useAutoComplete() { | `readonly` | 是否只读 | _boolean_ | `false` | | `disabled` | 是否禁用 | _boolean_ | `false` | | `validate-trigger` | 触发验证的时机,可选值为 `onFocus` `onBlur` `onChange` `onClick` `onClear` `onInput` | _AutoCompleteValidateTrigger[]_ | `['onInput', 'onClear', 'onChange']` | -| `rules` | 验证规则,返回 `true` 表示验证通过,其余的值则转换为文本作为用户提示 | _Array<(v: string) => any>_ | `-` | +| `rules` | 验证规则,返回 `true` 表示验证通过,其余的值则转换为文本作为用户提示 | _(v: string) => any \| ZodType \| Array<(v: string) => any \| ZodType>_ | `-` | | `enterkeyhint` | 定制回车键样式,参见 [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint) | _string_ | `-` | | `clearable` | 是否可清除 | _boolean_ | `false` | | `line` | 是否显示分割线 | _boolean_ | `true` | diff --git a/packages/varlet-ui/src/radio-group/docs/zh-CN.md b/packages/varlet-ui/src/radio-group/docs/zh-CN.md index b35b04bd3a8..d26bd48bdd9 100644 --- a/packages/varlet-ui/src/radio-group/docs/zh-CN.md +++ b/packages/varlet-ui/src/radio-group/docs/zh-CN.md @@ -207,7 +207,7 @@ const value = ref(false)