mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-09 04:31:35 +08:00
docs: update most props default from null to undefined
This commit is contained in:
parent
6b378e958f
commit
81b7a97cdd
@ -15,7 +15,7 @@ after-select
|
||||
|blur-after-select|`boolean`|`false`||
|
||||
|clear-after-select|`boolean`|`false`||
|
||||
|options|`Array<string \| AutoCompleteOption \| AutoCompleteOptionGroup>`|`[]`||
|
||||
|placeholder|`string`|`null`||
|
||||
|placeholder|`string`|`undefined`||
|
||||
|size|`'small' \| 'medium' \| 'large'`|`'medium'`||
|
||||
|theme|`'light' \| 'dark' \| string`|`undefined`||
|
||||
|value|`string`|`null`||
|
||||
|
@ -15,7 +15,7 @@ after-select
|
||||
|blur-after-select|`boolean`|`false`||
|
||||
|clear-after-select|`boolean`|`false`||
|
||||
|options|`Array<string \| AutoCompleteOption \| AutoCompleteOptionGroup>`|`[]`||
|
||||
|placeholder|`string`|`null`||
|
||||
|placeholder|`string`|`undefined`||
|
||||
|size|`'small' \| 'medium' \| 'large'`|`'medium'`||
|
||||
|theme|`'light' \| 'dark' \| string`|`undefined`||
|
||||
|value|`string`|`null`||
|
||||
|
@ -13,7 +13,7 @@ name-size
|
||||
|Name|Type|Default|Description|
|
||||
|-|-|-|-|
|
||||
|size|`'small' \| 'medium' \| 'large' \| number`| `'medium'`||
|
||||
|src|`string`|`null`||
|
||||
|src|`string`|`undefined`||
|
||||
|round|`boolean`|`false`||
|
||||
|theme|`'light' \| 'dark' \| string`|`undefined`||
|
||||
|themed-style|`{ [themeName: string]: Object }`|`undefined`||
|
||||
|
@ -13,7 +13,7 @@ name-size
|
||||
|名称|类型|默认值|说明|
|
||||
|-|-|-|-|
|
||||
|size|`'small' \| 'medium' \| 'large' \| number`| `'medium'`||
|
||||
|src|`string`|`null`||
|
||||
|src|`string`|`undefined`||
|
||||
|round|`boolean`|`false`||
|
||||
|theme|`'light' \| 'dark' \| string`|`undefined`||
|
||||
|themed-style|`{ [themeName: string]: Object }`|`undefined`||
|
||||
|
@ -17,7 +17,7 @@ event
|
||||
|-|-|-|-|
|
||||
|checked|`boolean`|`false`||
|
||||
|disabled|`boolean`|`false`||
|
||||
|label|`string \| function`|`null`|Could be a render function.|
|
||||
|label|`string \| function`|`undefined`|Could be a render function.|
|
||||
|theme|`'light' \| 'dark' \| string`|`undefined`||
|
||||
|value|`string \| number`|`null`||
|
||||
|on-update:checked|`(checked: boolean)`|`undefined`||
|
||||
|
@ -17,7 +17,7 @@ event
|
||||
|-|-|-|-|
|
||||
|checked|`boolean`|`false`||
|
||||
|disabled|`boolean`|`false`||
|
||||
|label|`string \| function`|`null`|可以是渲染函数|
|
||||
|label|`string \| function`|`undefined`|可以是渲染函数|
|
||||
|theme|`'light' \| 'dark' \| string`|`undefined`||
|
||||
|value|`string \| number`|`null`||
|
||||
|on-update:checked|`(checked: boolean)`|`undefined`||
|
||||
|
@ -16,7 +16,7 @@ item-header-click
|
||||
|accordion|`boolean`|`false`||
|
||||
|arrow-placement|`'left' \| 'right'`|`'left'`||
|
||||
|display-directive|`'if' \| 'show'`|`'if'`|The display directive to use when its inner `n-collapse-item` render content. `'if'` corresponds to `v-if` and `'show'` corresponds to `v-show`.|
|
||||
|expanded-names|`Array<string \| number>`|`null`||
|
||||
|expanded-names|`Array<string \| number>`|`undefined`||
|
||||
|theme|`'light' \| 'dark' \| string`|`undefined`||
|
||||
|on-update-expanded-names|`(expandedNames: Array<string>) => any`|`undefined`||
|
||||
|on-item-header-click|`(data: { name: string, expanded: boolean, event: MouseEvent }) => any`|`undefined`||
|
||||
@ -24,9 +24,9 @@ item-header-click
|
||||
### Collapse Item Props
|
||||
|Name|Type|Default|Description|
|
||||
|-|-|-|-|
|
||||
|display-directive|`'if' \| 'show' \| null`|`null`|The display directive to use when it is rendering its content. `'if'` corresponds to `v-if` and `'show'` corresponds to `v-show`. When it is set to `null` the value will follow its outer `n-collapse`.|
|
||||
|display-directive|`'if' \| 'show'`|`undefined`|The display directive to use when it is rendering its content. `'if'` corresponds to `v-if` and `'show'` corresponds to `v-show`. When it is set to `undefined` the value will follow its outer `n-collapse`.|
|
||||
|name|`string \| number`|required||
|
||||
|title|`string`|`null`||
|
||||
|title|`string`|`undefined`||
|
||||
|
||||
## Slots
|
||||
### Collapse Slots
|
||||
|
@ -16,7 +16,7 @@ item-header-click
|
||||
|accordion|`boolean`|`false`||
|
||||
|arrow-placement|`'left' \| 'right'`|`'left'`||
|
||||
|display-directive|`'if' \| 'show'`|`'if'`|内部 `n-collapse-item` 在控制内容是否渲染时使用的指令,`'if'` 对应 `v-if`,`'show'` 对应 `v-show`|
|
||||
|expanded-names|`Array<string \| number>`|`null`||
|
||||
|expanded-names|`Array<string \| number>`|`undefined`||
|
||||
|theme|`'light' \| 'dark' \| string`|`undefined`||
|
||||
|on-update-expanded-names|`(expandedNames: Array<string>) => any`|`undefined`||
|
||||
|on-item-header-click|`(data: { name: string, expanded: boolean, event: MouseEvent }) => any`|`undefined`||
|
||||
@ -25,9 +25,9 @@ item-header-click
|
||||
### Collapse Item Props
|
||||
|名称|类型|默认值|说明|
|
||||
|-|-|-|-|
|
||||
|display-directive|`'if' \| 'show' \| null`|`null`|自身在控制内容是否渲染时使用的指令,`'if'` 对应 `v-if`,`'show'` 对应 `v-show`。在设定为 `null` 的时候跟随外层的 `n-collapse`|
|
||||
|display-directive|`'if' \| 'show'`|`undefined`|自身在控制内容是否渲染时使用的指令,`'if'` 对应 `v-if`,`'show'` 对应 `v-show`。在设定为 `undefined` 的时候跟随外层的 `n-collapse`|
|
||||
|name|`string \| number`|required||
|
||||
|title|`string`|`null`||
|
||||
|title|`string`|`undefined`||
|
||||
|
||||
## Slots
|
||||
### Collapse Slots
|
||||
|
@ -16,6 +16,6 @@ transparent
|
||||
|abstract|`boolean`|`false`|If `n-config-provider` has no wrapper DOM|
|
||||
|tag|`string`|`'div'`|What tag `n-config-provider` will be rendered as|
|
||||
|language|`string`|`'en-US'`|Language of components inside `n-config-provider`|
|
||||
|namespace|`string`|`null`|Class name of detached parts of components inside `n-config-provider`|
|
||||
|theme|`string`|`null`|Theme name of components inside `n-config-provider`|
|
||||
|theme-environments|`{ [themeName: string]: any }`|`null`|An object with some value which can be accessed by `n-config-consumer` or `n-element` inside `n-config-provider`|
|
||||
|namespace|`string`|`undefined`|Class name of detached parts of components inside `n-config-provider`|
|
||||
|theme|`string`|`undefined`|Theme name of components inside `n-config-provider`|
|
||||
|theme-environments|`{ [themeName: string]: any }`|`undefined`|An object with some value which can be accessed by `n-config-consumer` or `n-element` inside `n-config-provider`|
|
||||
|
@ -16,7 +16,7 @@ transparent
|
||||
|abstract|`boolean`|`false`|是否不存在 DOM 包裹|
|
||||
|tag|`string`|`'div'`|`n-config-provider` 被渲染成的元素|
|
||||
|language|`string`|`'en-US'`|`n-config-provider` 内部的组件语言|
|
||||
|namespace|`string`|`null`|`n-config-provider` 内部组件被卸载于其他位置的 DOM 的类名|
|
||||
|theme|`string`|`null`|`n-config-provider` 内部组件的主题|
|
||||
|theme-environments|`{ [themeName: string]: any }`|`null`|一个可以被 `n-config-consumer` 或 `n-element` 获取到的主题环境变量,|
|
||||
|namespace|`string`'`undefined`|`n-config-provider` 内部组件被卸载于其他位置的 DOM 的类名|
|
||||
|theme|`string`'`undefined`|`n-config-provider` 内部组件的主题|
|
||||
|theme-environments|`{ [themeName: string]: any }`'`undefined`|一个可以被 `n-config-consumer` 或 `n-element` 获取到的主题环境变量,|
|
||||
|
||||
|
@ -27,7 +27,7 @@ size
|
||||
### Description Item Props
|
||||
|Name|Type|Default|Description|
|
||||
|-|-|-|-|
|
||||
|label|`string`|`null`||
|
||||
|label|`string`|`undefined`||
|
||||
|span|`number`|`1`||
|
||||
|
||||
## Slots
|
||||
|
@ -27,7 +27,7 @@ size
|
||||
### Description Item Props
|
||||
|名称|类型|默认值|说明|
|
||||
|-|-|-|-|
|
||||
|label|`string`|`null`||
|
||||
|label|`string`|`undefined`||
|
||||
|span|`number`|`1`||
|
||||
|
||||
## Slots
|
||||
|
@ -15,7 +15,7 @@ async
|
||||
|Name|Type|Default|Description|
|
||||
|-|-|-|-|
|
||||
|inline|`boolean`|`false`||
|
||||
|label-width|`number \| string`|`null`|The width of label. Can be useful when `label-placement` is `'left'`.|
|
||||
|label-width|`number \| string`|`undefined`|The width of label. Can be useful when `label-placement` is `'left'`.|
|
||||
|label-align|`'left' \| 'right'`|`'left'`|Text align in label.|
|
||||
|label-placement|`'left' \| 'top'`|`'top'`||
|
||||
|model|`Object`|`{}`|The object to get collected value from form items.|
|
||||
@ -36,21 +36,21 @@ async
|
||||
### Form Item Props
|
||||
|Name|Type|Default|Description|
|
||||
|-|-|-|-|
|
||||
|feedback|`string`|`null`|The feedback message of the form item. If not set to `null`, it will take place of the result of rule-based validation.|
|
||||
|feedback|`string`|`undefined`|The feedback message of the form item. If not set to `undefined`, it will take place of the result of rule-based validation.|
|
||||
|first|`boolean`|`false`|Whether only to show the first validation error message.|
|
||||
|ingore-path-change|`boolean`|`false`|Usually, the change of `path` will cause the data source's variation. So naive-ui will clear the validation result. If it is not expected, you can set it to `true`|
|
||||
|label|`string`|`null`||
|
||||
|label-align|`'left' \| 'right'`|`null`|Text align in label. If not set, use `label-align` from wrapper form.|
|
||||
|label-placement|`'left' \| 'top'`|`null`|If not set, use `label-placement` from wrapper form.|
|
||||
|label|`string`|`undefined`||
|
||||
|label-align|`'left' \| 'right'`|`undefined`|Text align in label. If not set, use `label-align` from wrapper form.|
|
||||
|label-placement|`'left' \| 'top'`|`undefined`|If not set, use `label-placement` from wrapper form.|
|
||||
|label-style|`Object`|`{}`||
|
||||
|label-width|`number \| string`|`null`|If not set, use `label-width` from the wrapper form.|
|
||||
|path|`string`|`null`|The path to collect item value to wrapper form's model object.|
|
||||
|label-width|`number \| string`|`undefined`|If not set, use `label-width` from the wrapper form.|
|
||||
|path|`string`|`undefined`|The path to collect item value to wrapper form's model object.|
|
||||
|required|`boolean`|`false`|Whether to show required mark. Note: a required rule has higher priority than this prop & this prop **won't** have any effect on validation. The validation still depends on the rules.|
|
||||
|rule|`FormItemRule \| Array<FormItemRule>`|`null`|The rule to validate the form item. It will be merged with the rules acquired by `rule-path` from wrapper form's rules. It's recommend to set all rules on wrapper form.|
|
||||
|rule-path|`string`|`null`|The path to get rule from wrapper form's rule object. If not set, use path of the form item instead.|
|
||||
|rule|`FormItemRule \| Array<FormItemRule>`|`undefined`|The rule to validate the form item. It will be merged with the rules acquired by `rule-path` from wrapper form's rules. It's recommend to set all rules on wrapper form.|
|
||||
|rule-path|`string`|`undefined`|The path to get rule from wrapper form's rule object. If not set, use path of the form item instead.|
|
||||
|show-require-mark|`boolean`|`true`|Whether to show require mark. If not set, use `show-require-mark` from wrapper form.|
|
||||
|size|`'small' \| 'medium' \| 'large'`|`'medium'`||
|
||||
|validation-status|`'error' \| 'success' \| 'warning' \| null`|`null`|The validation status of the form item. If not set to `null`, it will take place of the result of rule-based validation.|
|
||||
|validation-status|`'error' \| 'success' \| 'warning'`|`undefined`|The validation status of the form item. If not set to `undefined`, it will take place of the result of rule-based validation.|
|
||||
|
||||
|
||||
### Form Item Row Props
|
||||
|
@ -18,7 +18,7 @@ validator-debug
|
||||
|名称|类型|默认值|说明|
|
||||
|-|-|-|-|
|
||||
|inline|`boolean`|`false`||
|
||||
|label-width|`number \| string`|`null`|标签的宽度,在 `label-placement` 是 `'left'` 的时候可能会有用|
|
||||
|label-width|`number \| string`|`undefined`|标签的宽度,在 `label-placement` 是 `'left'` 的时候可能会有用|
|
||||
|label-align|`'left' \| 'right'`|`'left'`|标签的文本对齐方式|
|
||||
|label-placement|`'left' \| 'top'`|`'top'`||
|
||||
|model|`Object`|`{}`|获取表项中收集到的值的对象|
|
||||
@ -38,20 +38,20 @@ validator-debug
|
||||
### FormItem Props
|
||||
|名称|类型|默认值|说明|
|
||||
|-|-|-|-|
|
||||
|feedback|`string`|`null`|表项的反馈信息。不设为 `null` 时,会覆盖规则验证的结果|
|
||||
|feedback|`string`|`undefined`|表项的反馈信息。不设为 `undefined` 时,会覆盖规则验证的结果|
|
||||
|first|`boolean`|`false`|是否只展示首个出错信息|
|
||||
|ingore-path-change|`boolean`|`false`|通常 `path` 的改变会导致数据来源的变化,所以 naive-ui 会清空验证信息。如果不期望这个行为,可以将其置为 `true`|
|
||||
|label|`string`|`null`||
|
||||
|label-align|`'left' \| 'right'`|`null`|标签的文本对齐方式。如果没有被设定,使用外层表单的 `label-align`|
|
||||
|label-placement|`'left' \| 'top'`|`null`|如果没有被设定,使用外层表单的 `label-placement`|
|
||||
|label|`string`|`undefined`||
|
||||
|label-align|`'left' \| 'right'`|`undefined`|标签的文本对齐方式。如果没有被设定,使用外层表单的 `label-align`|
|
||||
|label-placement|`'left' \| 'top'`|`undefined`|如果没有被设定,使用外层表单的 `label-placement`|
|
||||
|label-style|`Object`|`{}`||
|
||||
|label-width|`number \| string`|`null`|如果没有被设定,使用外层表单的 `label-width`|
|
||||
|path|`string`|`null`|将值收集到外层表单 `model` 对象的路径|
|
||||
|rule|`FormItemRule \| Array<FormItemRule>`|`null`|验证表项的规则,它会被通过 `rule-path` 从外层表单获取的规则合并来作为表项的验证规则。推荐还是在外层表单设置所有规则|
|
||||
|rule-path|`string`|`null`|从外层表单的 `rules` 对象获取规则的路径。如果没有设定,使用表项的 `path` 代替|
|
||||
|label-width|`number \| string`|`undefined`|如果没有被设定,使用外层表单的 `label-width`|
|
||||
|path|`string`|`undefined`|将值收集到外层表单 `model` 对象的路径|
|
||||
|rule|`FormItemRule \| Array<FormItemRule>`|`undefined`|验证表项的规则,它会被通过 `rule-path` 从外层表单获取的规则合并来作为表项的验证规则。推荐还是在外层表单设置所有规则|
|
||||
|rule-path|`string`|`undefined`|从外层表单的 `rules` 对象获取规则的路径。如果没有设定,使用表项的 `path` 代替|
|
||||
|show-require-mark|`boolean`|`true`|是否展示必填的星号。如果没有被设定,使用外层 `n-form` 的 `show-require-mark`|
|
||||
|size|`'small' \| 'medium' \| 'large'`|`'medium'`||
|
||||
|validation-status|`'error' \| 'success' \| 'warning' \| null`|`null`|表单的验证状态。不设为 `null`时,会覆盖规则验证的结果|
|
||||
|validation-status|`'error' \| 'success' \| 'warning'`|`undefined`|表单的验证状态。不设为 `undefined`时,会覆盖规则验证的结果|
|
||||
|
||||
### FormItemRow Props
|
||||
接受 FormItem & [Row](n-row#Row-Props) 所有的 Props。
|
||||
|
@ -12,8 +12,8 @@ custom
|
||||
## Props
|
||||
|Name|Type|Default|Description|
|
||||
|-|-|-|-|
|
||||
|gradient|`string \| { from: string, to: string, deg: number \| string }`|`null`||
|
||||
|size|`number \| string`|`null`||
|
||||
|gradient|`string \| { from: string, to: string, deg: number \| string }`|`undefined`||
|
||||
|size|`number \| string`|`undefined`||
|
||||
|themed-style|`{ [themeName: string]: Object }`|`undefined`||
|
||||
|theme|`'light' \| 'dark' \| string`|`undefined`||
|
||||
|type|`'primary' \| 'info' \| 'success' \| 'warning' \| 'error'`|`'primary'`||
|
||||
|
@ -11,8 +11,8 @@ custom
|
||||
## Props
|
||||
|名称|类型|默认值|说明|
|
||||
|-|-|-|-|
|
||||
|gradient|`string \| { from: string, to: string, deg: number \| string }`|`null`||
|
||||
|size|`number \| string`|`null`||
|
||||
|gradient|`string \| { from: string, to: string, deg: number \| string }`|`undefined`||
|
||||
|size|`number \| string`|`undefined`||
|
||||
|themed-style|`{ [themeName: string]: Object }`|`undefined`||
|
||||
|theme|`'light' \| 'dark' \| string`|`undefined`||
|
||||
|type|`'primary' \| 'info' \| 'success' \| 'warning' \| 'error'`|`'primary'`||
|
||||
|
@ -26,15 +26,15 @@ passively-activated
|
||||
|autosize|`boolean \| { minRows?: number, maxRows?: number }`|`false`||
|
||||
|clearable|`boolean`|`false`||
|
||||
|disabled|`boolean`|`false`||
|
||||
|maxlength|`number`|`null`||
|
||||
|minlength|`number`|`null`||
|
||||
|maxlength|`number`|`undefined`||
|
||||
|minlength|`number`|`undefined`||
|
||||
|pair|`boolean`|`false`|Whether to input pairwise value.|
|
||||
|passively-activated|`boolean`|`false`||
|
||||
|placeholder|`string \| [string, string]`|`null`|Placeholder of input. When `pair` is `true`, placeholder is an array.|
|
||||
|placeholder|`string \| [string, string]`|`undefined`|Placeholder of input. When `pair` is `true`, placeholder is an array.|
|
||||
|readonly|`boolean`|`false`||
|
||||
|round|`boolean`|`false`||
|
||||
|rows|`number`|`3`||
|
||||
|separator|`string`|`null`|The separator bewteen pairwise inputs.|
|
||||
|separator|`string`|`undefined`|The separator bewteen pairwise inputs.|
|
||||
|size|`'small' \| 'medium' \| 'large'`|`'medium'`||
|
||||
|theme|`'light' \| 'dark' \| string`|`undefined`||
|
||||
|type|`'text' \| 'password' \| 'textarea'`|`'text'`||
|
||||
|
@ -26,15 +26,15 @@ passively-activated
|
||||
|autosize|`boolean \| { minRows?: number, maxRows?: number }`|`false`||
|
||||
|clearable|`boolean`|`false`||
|
||||
|disabled|`boolean`|`false`||
|
||||
|maxlength|`number`|`null`||
|
||||
|minlength|`number`|`null`||
|
||||
|maxlength|`number`|`undefined`||
|
||||
|minlength|`number`|`undefined`||
|
||||
|pair|`boolean`|`false`|是否输入成对的值|
|
||||
|passively-activated|`boolean`|`false`||
|
||||
|placeholder|`string \| [string, string]`|`null`|文本输入的占位符。如果是 `pair` 是 `true`,`placeholder`是一个数组|
|
||||
|placeholder|`string \| [string, string]`|`undefined`|文本输入的占位符。如果是 `pair` 是 `true`,`placeholder`是一个数组|
|
||||
|readonly|`boolean`|`false`||
|
||||
|round|`boolean`|`false`||
|
||||
|rows|`number`|`3`||
|
||||
|separator|`string`|`null`|成对的值中间的分隔符|
|
||||
|separator|`string`|`undefined`|成对的值中间的分隔符|
|
||||
|size|`'small' \| 'medium' \| 'large'`|`'medium'`||
|
||||
|theme|`'light' \| 'dark' \| string`|`undefined`||
|
||||
|type|`'text' \| 'password' \| 'textarea'`|`'text'`||
|
||||
|
@ -20,7 +20,7 @@ scroll-to
|
||||
|Name|Type|Default|Description|
|
||||
|-|-|-|-|
|
||||
|position|`'static' \| 'absolute'`|`'static'`|`static` position will make it css position set to `static`. `absolute` position will make it css position set to `absolute` and `left`, `right`, `top`, `bottom` to `0`. `absolute` position is very useful when you want to make content scroll in a fixed container or make the whole page's layout in a fixed position. You may need to change the style of the component to make it display as you expect.|
|
||||
|themed-style|`{ [themeName: string]: Object }`|`null`||
|
||||
|themed-style|`{ [themeName: string]: Object }`|`undefined`||
|
||||
|theme|`'light' \| 'dark' \| string`|`undefined`||
|
||||
|use-native-scrollbar|`boolean`|`true`|Whether to use native scrollbar on itself. If set to `false`, layout will use a naive-ui style scrollbar for content|
|
||||
|
||||
|
@ -20,7 +20,7 @@ scroll-to
|
||||
|名称|类型|默认值|说明|
|
||||
|-|-|-|-|
|
||||
|position|`'static' \| 'absolute'`|`'static'`|`static` 模式将会把 CSS `position` 设为 `static`, `absolute` 模式将会把 CSS `position` 设为 `absolute`,还将 `left`、`right`、`top`、`bottom` 设为 `0`。`absolute` 模式在你想将内容在一个固定容器或者将这个页面的布局设为固定位置的时候很有用。你可能需要修改一些 style 来确保它按照你预想的方式展示|
|
||||
|themed-style|`{ [themeName: string]: Object }`|`null`||
|
||||
|themed-style|`{ [themeName: string]: Object }`|`undefined`||
|
||||
|theme|`'light' \| 'dark' \| string`|`undefined`||
|
||||
|use-native-scrollbar|`boolean`|`true`|是否在自身使用原生滚动条。如果设定为 `false`, Layout 将会对内容使用 naive-ui 风格的滚动条|
|
||||
|
||||
|
@ -22,8 +22,8 @@ collapse
|
||||
|indent|`number`|`32`|The indend of menu|
|
||||
|items|`Array<MenuItem \| Submenu \| MenuItemGroup>`|`[]`|Items data of menu.|
|
||||
|mode|`'vertical' \| 'horizontal'`|`'vertical'`||
|
||||
|popover-body-style|`object \| null`|`{ padding: '2px 4px', minWidth: '180px' }`|菜单收缩时子菜单弹层的样式|
|
||||
|root-indent|`number`|`null`|The indent of menu's first level children. If not set, menu will use `indent` in place of it.|
|
||||
|popover-body-style|`object`|`{ padding: '2px 4px', minWidth: '180px' }`|菜单收缩时子菜单弹层的样式|
|
||||
|root-indent|`number`|`undefined`|The indent of menu's first level children. If not set, menu will use `indent` in place of it.|
|
||||
|theme|`'light' \| 'dark' \| string`|`undefined`||
|
||||
|value|`string`|`null`|The selected name of menu.|
|
||||
|on-update:expanded-keys|`(value: string[]) => any`|`() => {}`||
|
||||
|
@ -22,7 +22,7 @@ collapse
|
||||
|indent|`number`|`32`|菜单每级的缩进|
|
||||
|items|`Array<MenuItem \| Submenu \| MenuItemGroup>`|`[]`|菜单的数据|
|
||||
|mode|`'vertical' \| 'horizontal'`|`'vertical'`||
|
||||
|popover-body-style|`object \| null`|`{ padding: '2px 4px', minWidth: '180px' }`|菜单收缩时子菜单弹层的样式|
|
||||
|popover-body-style|`object`|`{ padding: '2px 4px', minWidth: '180px' }`|菜单收缩时子菜单弹层的样式|
|
||||
|root-indent|`number`|`32`|菜单第一级的缩进,如果没有设定,使用 `indent` 代替|
|
||||
|theme|`'light' \| 'dark' \| string`|`undefined`||
|
||||
|value|`string`|`null`|菜单当前的选中值|
|
||||
|
@ -12,7 +12,7 @@ from-end
|
||||
|align|`'start' \| 'end' \| 'center' \| 'baseline' \| 'stretch'`|`'start'`||
|
||||
|inline|`boolean`|`false`||
|
||||
|item-style|`string \| object`|`undefined`||
|
||||
|theme|`'light' \| 'dark' \| null`|`null`||
|
||||
|theme|`'light' \| 'dark' \| string`|`undefined`||
|
||||
|justify|`'start' \| 'end'`|`'start'`||
|
||||
|size|`'small' \| 'medium' \| 'large' \| number`|`medium`||
|
||||
|vertical|`boolean`|`false`||
|
||||
|
@ -12,7 +12,7 @@ from-end
|
||||
|align|`'start' \| 'end' \| 'center' \| 'baseline' \| 'stretch'`|`'start'`||
|
||||
|inline|`boolean`|`false`||
|
||||
|item-style|`string \| object`|`undefined`||
|
||||
|theme|`'light' \| 'dark' \| null`|`null`||
|
||||
|theme|`'light' \| 'dark' \| string`|`undefined`||
|
||||
|justify|`'start' \| 'end'`|`'start'`||
|
||||
|size|`'small' \| 'medium' \| 'large' \| number`|`medium`||
|
||||
|vertical|`boolean`|`false`||
|
||||
|
@ -25,8 +25,8 @@ display-directive
|
||||
|-|-|-|-|
|
||||
|disabled|`boolean`|`false`||
|
||||
|display-directive|`'if' \| 'show'`|`'if'`|The directive to use in conditionally rendering. 'if' will use 'v-if' and 'show' will use 'v-show'. When use show directive, the status of tab won't be reset after tab changes.|
|
||||
|label|`string`|`null`||
|
||||
|name|`string \| number`|`null`|**required**|
|
||||
|label|`string`|`undefined`||
|
||||
|name|`string \| number`|required||
|
||||
|
||||
## Slots
|
||||
### Tabs, Tab Pane Slots
|
||||
|
@ -26,7 +26,7 @@ line-debug
|
||||
|-|-|-|-|
|
||||
|disabled|`boolean`|`false`||
|
||||
|display-directive|`'if' \| 'show'`|`'if'`|选择性渲染使用的指令。if 对应 v-if,show 对应 v-show,使用 show 的时候标签页状态切换后不会被重置|
|
||||
|label|`string`|`null`||
|
||||
|label|`string`|`undefined`||
|
||||
|name|`string \| number`|required||
|
||||
|
||||
## Slots
|
||||
|
@ -12,7 +12,7 @@ unix
|
||||
|Name|Type|Default|Description|
|
||||
|-|-|-|-|
|
||||
|format|`string`|`undefined`||
|
||||
|time|`number \| Date`|`null`||
|
||||
|time|`number \| Date`|`undefined`||
|
||||
|to|`number \| Date`|`new Date()`||
|
||||
|type|`'relative' \| 'date' \| 'datetime'`|`'relative'`||
|
||||
|unix|`boolean`|`false`||
|
||||
|
@ -12,7 +12,7 @@ unix
|
||||
|名称|类型|默认值|说明|
|
||||
|-|-|-|-|
|
||||
|format|`string`|`undefined`||
|
||||
|time|`number \| Date`|`null`||
|
||||
|time|`number \| Date`|`undefined`||
|
||||
|to|`number \| Date`|`new Date()`||
|
||||
|type|`'relative' \| 'date' \| 'datetime'`|`'relative'`||
|
||||
|unix|`boolean`|`false`||
|
||||
|
@ -27,13 +27,13 @@ text
|
||||
|underline|`boolean`|`false`||
|
||||
|delete|`boolean`|`false`||
|
||||
|code|`boolean`|`false`||
|
||||
|depth|`'primary' \| 'secondary' \| 'tertiary'`|`null`||
|
||||
|tag|`string`|`null`|What tag should be this component be rendered as. Won't work when `code` or `del` is set.|
|
||||
|depth|`'primary' \| 'secondary' \| 'tertiary'`|`undefined`||
|
||||
|tag|`string`|`undefined`|What tag should be this component be rendered as. Won't work when `code` or `del` is set.|
|
||||
|
||||
### P Props
|
||||
|Name|Type|Default|Description|
|
||||
|-|-|-|-|
|
||||
|depth|`'primary' \| 'secondary' \| 'tertiary'`|`null`||
|
||||
|depth|`'primary' \| 'secondary' \| 'tertiary'`|`undefined`||
|
||||
|
||||
|
||||
### H1, H2, H3, H4, H5, H6 Props
|
||||
@ -41,12 +41,12 @@ text
|
||||
|-|-|-|-|
|
||||
|align-text|`boolean`|`false`||
|
||||
|type|`'default' \| 'success' \| 'info' \| 'warning' \| 'error'`|`'default'`||
|
||||
|prefix|`'bar'`|`null`||
|
||||
|prefix|`'bar'`|`undefined`||
|
||||
|
||||
### A Props
|
||||
|Name|Type|Default|Description|
|
||||
|-|-|-|-|
|
||||
|to|`string \| Object`|`null`|If the prop is set, it will be rendered as a Vue Router `router-link`s component. Make sure you don't want to use `href` attr.|
|
||||
|to|`string \| Object`|`undefined`|If the prop is set, it will be rendered as a Vue Router `router-link`s component. Make sure you don't want to use `href` attr.|
|
||||
|
||||
### Ul, Ol Props
|
||||
|Name|Type|Default|Description|
|
||||
|
@ -27,25 +27,25 @@ text
|
||||
|underline|`boolean`|`false`||
|
||||
|delete|`boolean`|`false`||
|
||||
|code|`boolean`|`false`||
|
||||
|depth|`'primary' \| 'secondary' \| 'tertiary'`|`null`||
|
||||
|tag|`string`|`null`|需要被渲染为什么标签,在 `code` 和 `del` 设定的情况下不生效|
|
||||
|depth|`'primary' \| 'secondary' \| 'tertiary'`|`undefined`||
|
||||
|tag|`string`|`undefined`|需要被渲染为什么标签,在 `code` 和 `del` 设定的情况下不生效|
|
||||
|
||||
### P Props
|
||||
|名称|类型|默认值|说明|
|
||||
|-|-|-|-|
|
||||
|depth|`'primary' \| 'secondary' \| 'tertiary'`|`null`||
|
||||
|depth|`'primary' \| 'secondary' \| 'tertiary'`|`undefined`||
|
||||
|
||||
### H1, H2, H3, H4, H5, H6 Props
|
||||
|名称|类型|默认值|说明|
|
||||
|-|-|-|-|
|
||||
|align-text|`boolean`|`false`||
|
||||
|type|`'default' \| 'success' \| 'info' \| 'warning' \| 'error'`|`'default'`||
|
||||
|prefix|`'bar'`|`null`||
|
||||
|prefix|`'bar'`|`undefined`||
|
||||
|
||||
### A Props
|
||||
|名称|类型|默认值|说明|
|
||||
|-|-|-|-|
|
||||
|to|`string \| Object`|`null`|如果设定了 to prop,a 会被渲染为一个 Vue Router 的 `router-link` 标签。确保你想用的不是 href 属性|
|
||||
|to|`string \| Object`|`undefined`|如果设定了 to prop,a 会被渲染为一个 Vue Router 的 `router-link` 标签。确保你想用的不是 href 属性|
|
||||
|
||||
### Ul, Ol Props
|
||||
|名称|类型|默认值|说明|
|
||||
|
@ -14,16 +14,16 @@ default-files
|
||||
### Upload Props
|
||||
|Name|Type|Default|Description|
|
||||
|-|-|-|-|
|
||||
|accept|`string`|`null`|The accept type of upload. See <n-a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept">accept</n-a>.|
|
||||
|action|`string`|`null`|The URL to submit data to.|
|
||||
|data|`Object \| ({ file: UploadFile }) => Object`|`null`|The additional fileds data of HTTP request's form data.|
|
||||
|accept|`string`'`undefined`|The accept type of upload. See <n-a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept">accept</n-a>.|
|
||||
|action|`string`'`undefined`|The URL to submit data to.|
|
||||
|data|`Object \| ({ file: UploadFile }) => Object`'`undefined`|The additional fileds data of HTTP request's form data.|
|
||||
|default-file-list|`Array<UploadFile>`|`[]`|The default file list in uncontrolled manner.|
|
||||
|default-upload|`boolean`|`false`|If file uploaded immediatelly after file is selected.|
|
||||
|directory|`boolean`|`false`|If directory upload supported. Browser support needed. See <n-a href="https://caniuse.com/#feat=input-file-directory">input-file-directory</n-a>.|
|
||||
|disabled|`boolean`|`false`||
|
||||
|file-list-style|`Object`|`null`|The style of file list area|
|
||||
|file-list-style|`Object`'`undefined`|The style of file list area|
|
||||
|file-list|`Array<UploadFile>`|`undefined`|The file list of component. If set, the component will work in controlled manner.|
|
||||
|headers|`Object \| ({ file: UploadFile }) => Object`|`null`|The additional HTTP Headers of request.|
|
||||
|headers|`Object \| ({ file: UploadFile }) => Object`'`undefined`|The additional HTTP Headers of request.|
|
||||
|method|`string`|`'POST'`|The method of HTTP request.|
|
||||
|multiple|`boolean`|`false`|If multiple files selection supported.|
|
||||
|name|`string`|`'file'`|The field name of file in form data.|
|
||||
|
@ -13,16 +13,16 @@ default-files
|
||||
### Upload Props
|
||||
|名称|类型|默认值|说明|
|
||||
|-|-|-|-|
|
||||
|accept|`string`|`null`|接受的文件类型,参考 <n-a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept">accept</n-a>|
|
||||
|action|`string`|`null`|请求提交的地址|
|
||||
|data|`Object \| ({ file: UploadFile }) => Object`|`null`|提交表单需要附加的数据|
|
||||
|accept|`string`'`undefined`|接受的文件类型,参考 <n-a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept">accept</n-a>|
|
||||
|action|`string`'`undefined`|请求提交的地址|
|
||||
|data|`Object \| ({ file: UploadFile }) => Object`'`undefined`|提交表单需要附加的数据|
|
||||
|default-file-list|`Array<UploadFile>`|`[]`|非受控状态下默认的文件列表|
|
||||
|default-upload|`boolean`|`false`|选择文件时候是否默认上传|
|
||||
|directory|`boolean`|`false`|是否支持目录上传,需要浏览器支持,参考 <n-a href="https://caniuse.com/#feat=input-file-directory">input-file-directory</n-a>|
|
||||
|disabled|`boolean`|`false`||
|
||||
|file-list-style|`Object`|`null`|文件列表区域的样式|
|
||||
|file-list-style|`Object`'`undefined`|文件列表区域的样式|
|
||||
|file-list|`Array<UploadFile>`|`undefined`|文件列表,如果传入组件会处于受控状态|
|
||||
|headers|`Object \| ({ file: UploadFile }) => Object`|`null`|HTTP 请求需要附加的 Headers|
|
||||
|headers|`Object \| ({ file: UploadFile }) => Object`'`undefined`|HTTP 请求需要附加的 Headers|
|
||||
|method|`string`|`'POST'`|HTTP 请求的方法|
|
||||
|multiple|`boolean`|`false`|是否支持多个文件|
|
||||
|name|`string`|`'file'`|文件在提交表单中的字段名|
|
||||
|
Loading…
Reference in New Issue
Block a user