From 94cd3cb45b8c3e488ec1065d982217823aad0a33 Mon Sep 17 00:00:00 2001 From: haoziqaq <357229046@qq.com> Date: Sun, 15 Sep 2024 00:13:13 +0800 Subject: [PATCH] docs: improve docs --- packages/varlet-ui/src/auto-complete/docs/en-US.md | 2 +- packages/varlet-ui/src/auto-complete/docs/zh-CN.md | 2 +- packages/varlet-ui/src/checkbox-group/docs/en-US.md | 2 +- packages/varlet-ui/src/checkbox-group/docs/zh-CN.md | 2 +- packages/varlet-ui/src/checkbox/docs/en-US.md | 2 +- packages/varlet-ui/src/checkbox/docs/zh-CN.md | 2 +- packages/varlet-ui/src/counter/docs/en-US.md | 2 +- packages/varlet-ui/src/counter/docs/zh-CN.md | 2 +- packages/varlet-ui/src/input/docs/en-US.md | 2 +- packages/varlet-ui/src/input/docs/zh-CN.md | 2 +- packages/varlet-ui/src/radio-group/docs/en-US.md | 2 +- packages/varlet-ui/src/radio-group/docs/zh-CN.md | 2 +- packages/varlet-ui/src/radio/docs/en-US.md | 2 +- packages/varlet-ui/src/radio/docs/zh-CN.md | 2 +- packages/varlet-ui/src/rate/docs/en-US.md | 2 +- packages/varlet-ui/src/rate/docs/zh-CN.md | 2 +- packages/varlet-ui/src/select/docs/en-US.md | 2 +- packages/varlet-ui/src/select/docs/zh-CN.md | 2 +- packages/varlet-ui/src/slider/docs/en-US.md | 2 +- packages/varlet-ui/src/slider/docs/zh-CN.md | 2 +- packages/varlet-ui/src/switch/docs/en-US.md | 2 +- packages/varlet-ui/src/switch/docs/zh-CN.md | 2 +- packages/varlet-ui/src/uploader/docs/en-US.md | 2 +- packages/varlet-ui/src/uploader/docs/zh-CN.md | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/packages/varlet-ui/src/auto-complete/docs/en-US.md b/packages/varlet-ui/src/auto-complete/docs/en-US.md index 32115a607f6..3ce58ffce29 100644 --- a/packages/varlet-ui/src/auto-complete/docs/en-US.md +++ b/packages/varlet-ui/src/auto-complete/docs/en-US.md @@ -246,7 +246,7 @@ function useAutoComplete() { | `readonly` | Whether the readonly | _boolean_ | `false` | | `disabled` | Whether the disabled | _boolean_ | `false` | | `validate-trigger` | Timing to trigger validation, The optional value is `onFocus` `onBlur` `onChange` `onClick` `onClear` `onInput` | _AutoCompleteValidateTrigger[]_ | `['onInput', 'onClear', 'onChange']` | -| `rules` | Validation rules, return `true` to indicate verification passes, other types of values ​​will be converted into text as user prompts. [Zod validation](#/en-US/zodValidation) is supported since `3.5.0` | _(v: string) => any \| ZodType \| Array<(v: string) => any \| ZodType>_ | `-` | +| `rules` | Validation rules, return `true` to indicate verification passes, other types of values ​​will be converted into text as user prompts. [Zod validation](#/en-US/zodValidation) is supported since `3.5.0` | _((v: string) => any) \| ZodType \| Array<((v: string) => any) \| ZodType>_ | `-` | | `enterkeyhint` | Customize the enter key style, See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint) | _string_ | `-` | | `clearable` | Whether the clearable | _boolean_ | `false` | | `line` | Whether to display a dividing line | _boolean_ | `true` | 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 abf64462d34..c2216ed48c8 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` 表示验证通过,其余的值则转换为文本作为用户提示 | _(v: string) => any \| ZodType \| Array<(v: string) => any \| ZodType>_ | `-` | +| `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/checkbox-group/docs/en-US.md b/packages/varlet-ui/src/checkbox-group/docs/en-US.md index e72eda1b778..6978c55b7a6 100644 --- a/packages/varlet-ui/src/checkbox-group/docs/en-US.md +++ b/packages/varlet-ui/src/checkbox-group/docs/en-US.md @@ -324,7 +324,7 @@ const value = ref([]) | `options` ***3.2.11*** | Specifies options | _CheckboxGroupOption[]_ | `[]` | | `label-key` ***3.2.12*** | As the key that uniquely identifies label | _string_ | `label` | | `value-key` ***3.2.12*** | As the key that uniquely identifies value | _string_ | `value` | -| `rules` | Validation rules, return `true` to indicate verification passes, other types of values ​​will be converted into text as user prompts. [Zod validation](#/en-US/zodValidation) is supported since `3.5.0` | _(v: any[]) => any \| ZodType \| Array<(v: any[]) => any \| ZodType>_ | `-` | +| `rules` | Validation rules, return `true` to indicate verification passes, other types of values ​​will be converted into text as user prompts. [Zod validation](#/en-US/zodValidation) is supported since `3.5.0` | _((v: any[]) => any) \| ZodType \| Array<((v: any[]) => any) \| ZodType>_ | `-` | #### CheckboxGroupOption diff --git a/packages/varlet-ui/src/checkbox-group/docs/zh-CN.md b/packages/varlet-ui/src/checkbox-group/docs/zh-CN.md index dbc5246fd66..280c82f6d57 100644 --- a/packages/varlet-ui/src/checkbox-group/docs/zh-CN.md +++ b/packages/varlet-ui/src/checkbox-group/docs/zh-CN.md @@ -323,7 +323,7 @@ const value = ref([]) | `options` ***3.2.11*** | 指定可选项 | _CheckboxGroupOption[]_ | `[]` | | `label-key` ***3.2.12*** | 作为 label 唯一标识的键名 | _string_ | `label` | | `value-key` ***3.2.12*** | 作为 value 唯一标识的键名 | _string_ | `value` | -| `rules` | 验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation) | _(v: any[]) => any \| ZodType \| Array<(v: any[]) => any \| ZodType>_ | `-` | +| `rules` | 验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation) | _((v: any[]) => any) \| ZodType \| Array<((v: any[]) => any) \| ZodType>_ | `-` | #### CheckboxGroupOption diff --git a/packages/varlet-ui/src/checkbox/docs/en-US.md b/packages/varlet-ui/src/checkbox/docs/en-US.md index 15e3b1c9455..650c7c961a1 100644 --- a/packages/varlet-ui/src/checkbox/docs/en-US.md +++ b/packages/varlet-ui/src/checkbox/docs/en-US.md @@ -14,7 +14,7 @@ | `readonly` | Whether the readonly | _boolean_ | `false` | | `indeterminate` | Whether indeterminate status(style has the highest priority) | _boolean_ | `false` | | `ripple` | Whether to open ripple | _boolean_ | `true` | -| `rules` | Validation rules, return `true` to indicate verification passes, other types of values ​​will be converted into text as user prompts. [Zod validation](#/en-US/zodValidation) is supported since `3.5.0` | _(v: any) => any \| ZodType \| Array<(v: any) => any \| ZodType>_ | `-` | +| `rules` | Validation rules, return `true` to indicate verification passes, other types of values ​​will be converted into text as user prompts. [Zod validation](#/en-US/zodValidation) is supported since `3.5.0` | _((v: any) => any) \| ZodType \| Array<((v: any) => any) \| ZodType>_ | `-` | ### Events diff --git a/packages/varlet-ui/src/checkbox/docs/zh-CN.md b/packages/varlet-ui/src/checkbox/docs/zh-CN.md index ca1ddb41a68..d701e1bf0a2 100644 --- a/packages/varlet-ui/src/checkbox/docs/zh-CN.md +++ b/packages/varlet-ui/src/checkbox/docs/zh-CN.md @@ -14,7 +14,7 @@ | `readonly` | 是否只读 | _boolean_ | `false` | | `indeterminate` | 是否为不确定状态(样式优先级最高) | _boolean_ | `false` | | `ripple` | 是否开启水波纹 | _boolean_ | `true` | -| `rules` | 验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation) | _(v: any) => any \| ZodType \| Array<(v: any) => any \| ZodType>_ | `-` | +| `rules` | 验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation) | _((v: any) => any) \| ZodType \| Array<((v: any) => any) \| ZodType>_ | `-` | ### 事件 diff --git a/packages/varlet-ui/src/counter/docs/en-US.md b/packages/varlet-ui/src/counter/docs/en-US.md index 7d9014887f7..1d5c9a2f2c3 100644 --- a/packages/varlet-ui/src/counter/docs/en-US.md +++ b/packages/varlet-ui/src/counter/docs/en-US.md @@ -198,7 +198,7 @@ const value = ref(0) | `ripple` | Whether to open ripple | _boolean_ | `true` | | `lazy-change` | Whether to prevent the component itself from updating the bound value | _boolean_ | `false` | | `validate-trigger` | Timing to trigger validation,Optional value is `onInputChange` `onLazyChange` `onIncrement` `onDecrement` | _CounterValidateTrigger[]_ | `['onIncrement', 'onDecrement', 'onInputChange', 'onLazyChange']` | -| `rules` | Validation rules, return `true` to indicate verification passes, other types of values ​​will be converted into text as user prompts. [Zod validation](#/en-US/zodValidation) is supported since `3.5.0` | _(v: number) => any \| ZodType \| Array<(v: number) => any \| ZodType>_ | `-` | +| `rules` | Validation rules, return `true` to indicate verification passes, other types of values ​​will be converted into text as user prompts. [Zod validation](#/en-US/zodValidation) is supported since `3.5.0` | _((v: number) => any) \| ZodType \| Array<((v: number) => any) \| ZodType>_ | `-` | ### Methods diff --git a/packages/varlet-ui/src/counter/docs/zh-CN.md b/packages/varlet-ui/src/counter/docs/zh-CN.md index 44550f04d69..c5a4b2c0f7a 100644 --- a/packages/varlet-ui/src/counter/docs/zh-CN.md +++ b/packages/varlet-ui/src/counter/docs/zh-CN.md @@ -198,7 +198,7 @@ const value = ref(0) | `ripple` | 是否开启水波纹 | _boolean_ | `true` | | `lazy-change` | 是否阻止组件本身的绑定值更新操作 | _boolean_ | `false` | | `validate-trigger` | 触发验证的时机,可选值为 `onInputChange` `onLazyChange` `onIncrement` `onDecrement` | _CounterValidateTrigger[]_ | `['onIncrement', 'onDecrement', 'onInputChange', 'onLazyChange']` | -| `rules` | 验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation) | _(v: number) => any \| ZodType \| Array<(v: number) => any \| ZodType>_ | `-` | +| `rules` | 验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation) | _((v: number) => any) \| ZodType \| Array<((v: number) => any) \| ZodType>_ | `-` | ### 方法 diff --git a/packages/varlet-ui/src/input/docs/en-US.md b/packages/varlet-ui/src/input/docs/en-US.md index de3cbb2f780..4bca83ee43b 100644 --- a/packages/varlet-ui/src/input/docs/en-US.md +++ b/packages/varlet-ui/src/input/docs/en-US.md @@ -193,7 +193,7 @@ const value14 = ref('') | `resize` | Whether textarea can be dragged to resize | _boolean_ | `false` | | `autofocus` | Whether the autofocus | _boolean_ | `false` | | `validate-trigger` | Timing to trigger validation, The optional value is `onFocus` `onBlur` `onChange` `onClick` `onClear` `onInput` | _InputValidateTrigger[]_ | `['onInput', 'onClear']` | -| `rules` | Validation rules, return `true` to indicate verification passes, other types of values ​​will be converted into text as user prompts. [Zod validation](#/en-US/zodValidation) is supported since `3.5.0` | _(v: string) => any \| ZodType \| Array<(v: string) => any \| ZodType>_ | `-` | +| `rules` | Validation rules, return `true` to indicate verification passes, other types of values ​​will be converted into text as user prompts. [Zod validation](#/en-US/zodValidation) is supported since `3.5.0` | _((v: string) => any) \| ZodType \| Array<((v: string) => any) \| ZodType>_ | `-` | | `enterkeyhint` | Customize the enter key style, See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint) | _string_ | `-` | ### Methods diff --git a/packages/varlet-ui/src/input/docs/zh-CN.md b/packages/varlet-ui/src/input/docs/zh-CN.md index 01dbfb6300b..f3eac67b564 100644 --- a/packages/varlet-ui/src/input/docs/zh-CN.md +++ b/packages/varlet-ui/src/input/docs/zh-CN.md @@ -193,7 +193,7 @@ const value14 = ref('') | `resize` | 文本域是否可以拖动调整尺寸 | _boolean_ | `false` | | `autofocus` | 是否自动聚焦 | _boolean_ | `false` | | `validate-trigger` | 触发验证的时机,可选值为 `onFocus` `onBlur` `onChange` `onClick` `onClear` `onInput` | _InputValidateTrigger[]_ | `['onInput', 'onClear']` | -| `rules` | 验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation) | _(v: string) => any \| ZodType \| Array<(v: string) => any \| ZodType>_ | `-` | +| `rules` | 验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation) | _((v: string) => any) \| ZodType \| Array<((v: string) => any) \| ZodType>_ | `-` | | `enterkeyhint` | 定制回车键样式,参见 [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint) | _string_ | `-` | ### 方法 diff --git a/packages/varlet-ui/src/radio-group/docs/en-US.md b/packages/varlet-ui/src/radio-group/docs/en-US.md index b33123272ae..b89cb62e46b 100644 --- a/packages/varlet-ui/src/radio-group/docs/en-US.md +++ b/packages/varlet-ui/src/radio-group/docs/en-US.md @@ -291,7 +291,7 @@ const value = ref(false) | `readonly` | Whether the readonly | _boolean_ | `false` | | `disabled` | Whether the disabled | _boolean_ | `false` | | `ripple` | Whether to open ripple | _boolean_ | `true` | -| `rules` | Validation rules, return `true` to indicate verification passes, other types of values ​​will be converted into text as user prompts. [Zod validation](#/en-US/zodValidation) is supported since `3.5.0` | _(v: string) => any \| ZodType \| Array<(v: string) => any \| ZodType>_ | `-` | +| `rules` | Validation rules, return `true` to indicate verification passes, other types of values ​​will be converted into text as user prompts. [Zod validation](#/en-US/zodValidation) is supported since `3.5.0` | _((v: string) => any) \| ZodType \| Array<((v: string) => any) \| ZodType>_ | `-` | ### Methods 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 eef4fbb9948..4b33215fe3a 100644 --- a/packages/varlet-ui/src/radio-group/docs/zh-CN.md +++ b/packages/varlet-ui/src/radio-group/docs/zh-CN.md @@ -268,7 +268,7 @@ const value = ref(false) | `options` ***3.2.14*** | 指定可选项 | _RadioGroupOption[]_ | `[]` | | `label-key` ***3.2.14*** | 作为 label 唯一标识的键名 | _string_ | `label` | | `value-key` ***3.2.14*** | 作为 value 唯一标识的键名 | _string_ | `value` | -| `rules` | 验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation) | _(v: any) => any \| ZodType \| Array<(v: any) => any \| ZodType>_ | `-` | +| `rules` | 验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation) | _((v: any) => any) \| ZodType \| Array<((v: any) => any) \| ZodType>_ | `-` | #### RadioGroupOption diff --git a/packages/varlet-ui/src/radio/docs/en-US.md b/packages/varlet-ui/src/radio/docs/en-US.md index 4a6ffc8e69c..8a92b296be6 100644 --- a/packages/varlet-ui/src/radio/docs/en-US.md +++ b/packages/varlet-ui/src/radio/docs/en-US.md @@ -13,7 +13,7 @@ | `readonly` | Whether the readonly | _boolean_ | `false` | | `disabled` | Whether the disabled | _boolean_ | `false` | | `ripple` | Whether to open ripple | _boolean_ | `true` | -| `rules` | Validation rules, return `true` to indicate verification passes, other types of values ​​will be converted into text as user prompts. [Zod validation](#/en-US/zodValidation) is supported since `3.5.0` | _(v: any) => any \| ZodType \| Array<(v: any) => any \| ZodType>_ | `-` | +| `rules` | Validation rules, return `true` to indicate verification passes, other types of values ​​will be converted into text as user prompts. [Zod validation](#/en-US/zodValidation) is supported since `3.5.0` | _((v: any) => any) \| ZodType \| Array<((v: any) => any) \| ZodType>_ | `-` | ### Events diff --git a/packages/varlet-ui/src/radio/docs/zh-CN.md b/packages/varlet-ui/src/radio/docs/zh-CN.md index bd9ac2070e1..7eec2ffd419 100644 --- a/packages/varlet-ui/src/radio/docs/zh-CN.md +++ b/packages/varlet-ui/src/radio/docs/zh-CN.md @@ -13,7 +13,7 @@ | `disabled` | 是否禁用 | _boolean_ | `false` | | `readonly` | 是否只读 | _boolean_ | `false` | | `ripple` | 是否开启水波纹 | _boolean_ | `true` | -| `rules` | 验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation) | _(v: any) => any \| ZodType \| Array<(v: any) => any \| ZodType>_ | `-` | +| `rules` | 验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation) | _((v: any) => any) \| ZodType \| Array<((v: any) => any) \| ZodType>_ | `-` | ### 事件 diff --git a/packages/varlet-ui/src/rate/docs/en-US.md b/packages/varlet-ui/src/rate/docs/en-US.md index 5b86985385c..bbf3ec4e258 100644 --- a/packages/varlet-ui/src/rate/docs/en-US.md +++ b/packages/varlet-ui/src/rate/docs/en-US.md @@ -215,7 +215,7 @@ const score = ref(3) | `readonly` | Whether it is in readonly status. The rating cannot be modified in readonly status. | _boolean_ | `false` | | `clearable` | whether to allow to clear | _boolean_ | `false` | | `ripple` | Whether to use water ripple | _boolean_ | `true` | -| `rules` | Validation rules, return `true` to indicate verification passes, other types of values ​​will be converted into text as user prompts. [Zod validation](#/en-US/zodValidation) is supported since `3.5.0` | _(v: number) => any \| ZodType \| Array<(v: number) => any \| ZodType>_ | `-` | +| `rules` | Validation rules, return `true` to indicate verification passes, other types of values ​​will be converted into text as user prompts. [Zod validation](#/en-US/zodValidation) is supported since `3.5.0` | _((v: number) => any) \| ZodType \| Array<((v: number) => any) \| ZodType>_ | `-` | ### Events diff --git a/packages/varlet-ui/src/rate/docs/zh-CN.md b/packages/varlet-ui/src/rate/docs/zh-CN.md index 594521de14e..3341086640e 100644 --- a/packages/varlet-ui/src/rate/docs/zh-CN.md +++ b/packages/varlet-ui/src/rate/docs/zh-CN.md @@ -215,7 +215,7 @@ const score = ref(3) | `readonly` | 是否为只读状态,只读状态下无法修改评分 | _boolean_ | `false` | | `clearable` | 是否允许清空 | _boolean_ | `false` | | `ripple` | 是否使用水波纹 | _boolean_ | `true` | -| `rules` | 验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation) | _(v: number) => any \| ZodType \| Array<(v: number) => any \| ZodType>_ | `-` | +| `rules` | 验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation) | _((v: number) => any) \| ZodType \| Array<((v: number) => any) \| ZodType>_ | `-` | ### 事件 diff --git a/packages/varlet-ui/src/select/docs/en-US.md b/packages/varlet-ui/src/select/docs/en-US.md index 1ce13d9847e..956752d954d 100644 --- a/packages/varlet-ui/src/select/docs/en-US.md +++ b/packages/varlet-ui/src/select/docs/en-US.md @@ -479,7 +479,7 @@ const keyOptions = ref([ | `label-key` ***3.3.4*** | As the key that uniquely identifies label | _string_ | `label` | | `value-key` ***3.3.4*** | As the key that uniquely identifies value | _string_ | `value` | | `validate-trigger` | Timing to trigger validation, optional value is `onFocus` `onBlur` `onChange` `onClick` `onClear` `onClose` | _SelectValidateTrigger[]_ | `['onChange', 'onClear', 'onClose']` | -| `rules` | Validation rules, return `true` to indicate verification passes, other types of values ​​will be converted into text as user prompts. [Zod validation](#/en-US/zodValidation) is supported since `3.5.0` | _(v: any) => any \| ZodType \| Array<(v: any) => any \| ZodType>_ | `-` | +| `rules` | Validation rules, return `true` to indicate verification passes, other types of values ​​will be converted into text as user prompts. [Zod validation](#/en-US/zodValidation) is supported since `3.5.0` | _((v: any) => any) \| ZodType \| Array<((v: any) => any) \| ZodType>_ | `-` | #### SelectOption diff --git a/packages/varlet-ui/src/select/docs/zh-CN.md b/packages/varlet-ui/src/select/docs/zh-CN.md index e371913b83b..990d96386f1 100644 --- a/packages/varlet-ui/src/select/docs/zh-CN.md +++ b/packages/varlet-ui/src/select/docs/zh-CN.md @@ -480,7 +480,7 @@ const keyOptions = ref([ | `label-key` ***3.3.4*** | 作为 label 唯一标识的键名 | _string_ | `label` | | `value-key` ***3.3.4*** | 作为 value 唯一标识的键名 | _string_ | `value` | | `validate-trigger` | 触发验证的时机,可选值为 `onFocus` `onBlur` `onChange` `onClick` `onClear` `onClose` | _SelectValidateTrigger[]_ | `['onChange', 'onClear', 'onClose']` | -| `rules` | 验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation) | _(v: any) => any \| ZodType \| Array<(v: any) => any \| ZodType>_ | `-` | +| `rules` | 验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation) | _((v: any) => any) \| ZodType \| Array<((v: any) => any) \| ZodType>_ | `-` | #### SelectOption diff --git a/packages/varlet-ui/src/slider/docs/en-US.md b/packages/varlet-ui/src/slider/docs/en-US.md index aabaacd9024..746d6549bf0 100644 --- a/packages/varlet-ui/src/slider/docs/en-US.md +++ b/packages/varlet-ui/src/slider/docs/en-US.md @@ -267,7 +267,7 @@ const value2 = ref([7, 64]) | `disabled`| Whether to disable slider | _boolean_ | `false` | | `readonly`| Whether to readonly slider | _boolean_ | `false` | | `direction` | Direction of slider, Can be set to `vertical horizontal` | _string_ | `horizontal` | -| `rules` | Validation rules, return `true` to indicate verification passes, other types of values ​​will be converted into text as user prompts. [Zod validation](#/en-US/zodValidation) is supported since `3.5.0` | _(v: number \| [number, number]) => any \| ZodType \| Array<(v: number \| [number, number]) => any \| ZodType>_ | `-` | +| `rules` | Validation rules, return `true` to indicate verification passes, other types of values ​​will be converted into text as user prompts. [Zod validation](#/en-US/zodValidation) is supported since `3.5.0` | _((v: number \| [number, number]) => any) \| ZodType \| Array<((v: number \| [number, number]) => any) \| ZodType>_ | `-` | ### Events | Event | Description | arguments | diff --git a/packages/varlet-ui/src/slider/docs/zh-CN.md b/packages/varlet-ui/src/slider/docs/zh-CN.md index 5e848bb432d..260d5f72dd7 100644 --- a/packages/varlet-ui/src/slider/docs/zh-CN.md +++ b/packages/varlet-ui/src/slider/docs/zh-CN.md @@ -268,7 +268,7 @@ const value2 = ref([7, 64]) | `disabled` | 是否禁用 | _boolean_ | `false` | | `readonly` | 是否只读 | _boolean_ | `false` | | `direction` | 显示方向,可选值为 `vertical horizontal` | _string_ | `horizontal` | -| `rules` | 验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation) | _(v: number \| [number, number]) => any \| ZodType \| Array<(v: number \| [number, number]) => any \| ZodType>_ | `-` | +| `rules` | 验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation) | _((v: number \| [number, number]) => any) \| ZodType \| Array<((v: number \| [number, number]) => any) \| ZodType>_ | `-` | ### 事件 diff --git a/packages/varlet-ui/src/switch/docs/en-US.md b/packages/varlet-ui/src/switch/docs/en-US.md index 447f35e31ff..b1f216a2709 100644 --- a/packages/varlet-ui/src/switch/docs/en-US.md +++ b/packages/varlet-ui/src/switch/docs/en-US.md @@ -170,7 +170,7 @@ const value = ref(true) | `close-color` | Background color when close | _string_ | `-` | | `loading-color` | Color of loading icon | _string_ | `-` | | `size` | Size of switch | _string \| number_ | `-` | -| `rules` | Validation rules, return `true` to indicate verification passes, other types of values ​​will be converted into text as user prompts. [Zod validation](#/en-US/zodValidation) is supported since `3.5.0` | _(v: any) => any \| ZodType \| Array<(v: any) => any \| ZodType>_ | `-` | +| `rules` | Validation rules, return `true` to indicate verification passes, other types of values ​​will be converted into text as user prompts. [Zod validation](#/en-US/zodValidation) is supported since `3.5.0` | _((v: any) => any) \| ZodType \| Array<((v: any) => any) \| ZodType>_ | `-` | | `lazy-change` | Whether to allow the `before-change` event to be triggered | _boolean_ | `false` | | `validate-trigger` | Timing to trigger verification, optional values are `onChange` `onLazyChange` | _SwitchValidateTrigger[]_ | `['onChange', 'onLazyChange']` | | `variant` ***3.2.3*** | Variant mode | _boolean_ | `false` | diff --git a/packages/varlet-ui/src/switch/docs/zh-CN.md b/packages/varlet-ui/src/switch/docs/zh-CN.md index eaa33f4bd99..f8da8e98470 100644 --- a/packages/varlet-ui/src/switch/docs/zh-CN.md +++ b/packages/varlet-ui/src/switch/docs/zh-CN.md @@ -170,7 +170,7 @@ const value = ref(true) | `loading-color` | 加载图标的颜色 | _string_ | `-` | | `close-color` | 关闭状态下的颜色 | _string_ | `-` | | `size` | switch 的大小 | _string \| number_ | `-` | -| `rules` | 验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation) | _(v: any) => any \| ZodType \| Array<(v: any) => any \| ZodType>_ | `-` | +| `rules` | 验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation) | _((v: any) => any) \| ZodType \| Array<((v: any) => any) \| ZodType>_ | `-` | | `lazy-change` | 是否允许触发 `before-change` 事件 | _boolean_ | `false` | | `validate-trigger` | 触发验证的时机,可选值为 `onChange` `onLazyChange` | _SwitchValidateTrigger[]_ | `['onChange', 'onLazyChange']` | | `variant` ***3.2.3*** | 变体模式 | _boolean_ | `false` | diff --git a/packages/varlet-ui/src/uploader/docs/en-US.md b/packages/varlet-ui/src/uploader/docs/en-US.md index 88579443ce7..1d9bf18e25f 100644 --- a/packages/varlet-ui/src/uploader/docs/en-US.md +++ b/packages/varlet-ui/src/uploader/docs/en-US.md @@ -457,7 +457,7 @@ const files = ref([ | `hide-list` | Whether to hide the file list | _boolean_ | `false` | | `resolve-type` | The file preprocessing type, can be set to `default` `file` `data-url` (`default`, the image type contains dataURL and File object, other types contain only File object. `file`, which contains only File object. `data-url`, all file types contain dataURL and File object) | _string_ | `default` | | `validate-trigger` | Timing to trigger validation. The optional value is `onChange` `onRemove` | _UploaderValidateTrigger[]_ | `['onChange', 'onRemove']` | -| `rules` | Validation rules, return `true` to indicate verification passes, other types of values ​​will be converted into text as user prompts. [Zod validation](#/en-US/zodValidation) is supported since `3.5.0` | _(v: VarFile[]) => any \| ZodType \| Array<(v: VarFile[]) => any \| ZodType>_ | `-` | +| `rules` | Validation rules, return `true` to indicate verification passes, other types of values ​​will be converted into text as user prompts. [Zod validation](#/en-US/zodValidation) is supported since `3.5.0` | _((v: VarFile[]) => any) \| ZodType \| Array<((v: VarFile[]) => any) \| ZodType>_ | `-` | ### VarFile diff --git a/packages/varlet-ui/src/uploader/docs/zh-CN.md b/packages/varlet-ui/src/uploader/docs/zh-CN.md index 98281a4bc2b..f840c98c264 100644 --- a/packages/varlet-ui/src/uploader/docs/zh-CN.md +++ b/packages/varlet-ui/src/uploader/docs/zh-CN.md @@ -456,7 +456,7 @@ const files = ref([ | `hide-list` | 是否隐藏文件列表 | _boolean_ | `false` | | `resolve-type` | 文件预处理类型,可选值为 `default` `file` `data-url`(`default`,图片文件包含 dataURL 编码和 File 对象,其他类型仅包含 File 对象。`file`,仅包含 File 对象。`data-url`,所有文件类型都包含 dataURL 编码和 File 对象) | _string_ | `default` | | `validate-trigger` | 触发验证的时机, 可选值为 `onChange` `onRemove` | _UploaderValidateTrigger[]_ | `['onChange', 'onRemove']` | -| `rules` | 验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation) | _(v: VarFile[]) => any \| ZodType \| Array<(v: VarFile[]) => any \| ZodType>_ | `-` | +| `rules` | 验证规则,返回 `true` 表示验证通过,其它类型的值将转换为文本作为用户提示。自 `3.5.0` 开始支持 [Zod 验证](#/zh-CN/zodValidation) | _((v: VarFile[]) => any) \| ZodType \| Array<((v: VarFile[]) => any) \| ZodType>_ | `-` | ### VarFile