mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
docs: optimize the format of some types in the document (#9998)
This commit is contained in:
@@ -47,14 +47,14 @@ Note, date time locale (month name, first day of the week ...) are also configur
|
||||
|
||||
## Attributes
|
||||
|
||||
| Name | Description | Type | Accepted Values | Default |
|
||||
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | --------------- | ------- |
|
||||
| model-value / v-model | binding value | Date | — | — |
|
||||
| range | time range, including start time and end time. Start time must be start day of week, end time must be end day of week, the time span cannot exceed two months. | Array\<Date\> | — | — |
|
||||
| Name | Description | Type | Default |
|
||||
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | ------- |
|
||||
| `model-value / v-model` | binding value | `Date` | — |
|
||||
| `range` | time range, including start time and end time. Start time must be start day of week, end time must be end day of week, the time span cannot exceed two months. | `[Date, Date]` | — |
|
||||
|
||||
## Slots
|
||||
|
||||
| Name | Description | Attribute |
|
||||
| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- |
|
||||
| date-cell | { type, isSelected, day, date }. `type` indicates which month the date belongs, optional values are prev-month, current-month, next-month; `isSelected` indicates whether the date is selected; `day` is the formatted date in the format YYYY-MM-DD; `date` is date the cell represents | data |
|
||||
| header | content of the Calendar header | — |
|
||||
| Name | Description | Type |
|
||||
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
|
||||
| `date-cell` | `type` indicates which month the date belongs, optional values are prev-month, current-month, next-month; `isSelected` indicates whether the date is selected; `day` is the formatted date in the format YYYY-MM-DD; `date` is date the cell represents | `{ type: 'prev-month' \| 'current-month' \| 'next-month', isSelected: boolean, day: string, date: Date }` |
|
||||
| `header` | content of the Calendar header | — |
|
||||
|
||||
@@ -164,7 +164,7 @@ Note, date time locale (month name, first day of the week ...) are also configur
|
||||
| clear-icon | custom clear icon component | `string \| Component` | — | CircleClose |
|
||||
| validate-event | whether to trigger form validation | boolean | — | true |
|
||||
| disabled-date | a function determining if a date is disabled with that date as its parameter. Should return a Boolean | function | — | — |
|
||||
| shortcuts | an object array to set shortcut options | Array\<{ text: string, value: Date \| Function }\> | — | — |
|
||||
| shortcuts | an object array to set shortcut options | `Array<{ text: string, value: Date \| Function }>` | — | — |
|
||||
| cell-class-name | set custom className | Function(Date) | — | — |
|
||||
| teleported | whether date-picker dropdown is teleported to the body | boolean | true / false | true |
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ form/accessibility
|
||||
| `label` | Label text. | `string` | — |
|
||||
| `label-width` | Width of label, e.g. `'50px'`. `'auto'` is supported. | `string \| number` | — |
|
||||
| `required` | Whether the field is required or not, will be determined by validation rules if omitted. | `boolean` | `false` |
|
||||
| `rules` | Validation rules of form, see the [following table](#formitemrule), more advanced usage at [async-validator](https://github.com/yiminghe/async-validator). | `FormItemRule / FormItemRule[]` | — |
|
||||
| `rules` | Validation rules of form, see the [following table](#formitemrule), more advanced usage at [async-validator](https://github.com/yiminghe/async-validator). | `FormItemRule \| FormItemRule[]` | — |
|
||||
| `error` | Field error message, set its value and the field will validate error and show this message immediately. | `string` | — |
|
||||
| `show-message` | Whether to show the error message. | `boolean` | `true` |
|
||||
| `inline-message` | Inline style validate message. | `boolean` | `false` |
|
||||
|
||||
@@ -214,13 +214,13 @@ import { Edit, Share, Delete, Search, Loading } from '@element-plus/icons-vue'
|
||||
|
||||
## Icon Attributes
|
||||
|
||||
| Name | Description | Type | Acceptable Value | Default |
|
||||
| ----- | -------------------------- | ------------------------------ | ---------------- | ---------------------- |
|
||||
| color | SVG tag's fill attribute | Pick\<CSSProperties, 'color'\> | - | inherit from color |
|
||||
| size | SVG icon size, size x size | number \| string | - | inherit from font size |
|
||||
| Name | Description | Type | Default |
|
||||
| ------- | -------------------------- | ------------------------------ | ---------------------- |
|
||||
| `color` | SVG tag's fill attribute | `Pick<CSSProperties, 'color'>` | inherit from color |
|
||||
| `size` | SVG icon size, size x size | `number \| string` | inherit from font size |
|
||||
|
||||
## Icon Slots
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ------------------------- |
|
||||
| — | customize default content |
|
||||
| Name | Description |
|
||||
| --------- | ------------------------- |
|
||||
| `default` | customize default content |
|
||||
|
||||
@@ -59,21 +59,21 @@ image/image-preview
|
||||
|
||||
### Image Attributes
|
||||
|
||||
| Name | Description | Type | Default |
|
||||
| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------------------- |
|
||||
| `src` | image source, same as native. | `string` | — |
|
||||
| `fit` | indicate how the image should be resized to fit its container, same as [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit). | `'fill' \| 'contain' \| 'cover' \| 'none' \| 'scale'-down'` | — |
|
||||
| `hide-on-click-modal` | when enabling preview, use this flag to control whether clicking on backdrop can exit preview mode. | `boolean` | `false` |
|
||||
| `loading` <VersionTag version="2.2.3" /> | Indicates how the browser should load the image, same as [native](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-loading) | `'eager' \| 'lazy'` | — |
|
||||
| `lazy` | whether to use lazy load. | `boolean` | `false` |
|
||||
| `scroll-container` | the container to add scroll listener when using lazy load. | `string \| HTMLElement` | the nearest parent container whose overflow property is auto or scroll. |
|
||||
| `alt` | native attribute `alt`. | `string` | — |
|
||||
| `referrer-policy` | native attribute `referrerPolicy`. | `string` | — |
|
||||
| `preview-src-list` | allow big image preview. | `string[]` | — |
|
||||
| `z-index` | set image preview z-index. | `number` | — |
|
||||
| `initial-index` | initial preview image index, less than the length of `url-list`. | `number` | `0` |
|
||||
| `close-on-press-escape` | whether the image-viewer can be closed by pressing ESC | `boolean` | `true` |
|
||||
| `preview-teleported` | whether to append image-viewer to body. A nested parent element attribute transform should have this attribute set to `true`. | `boolean` | `false` |
|
||||
| Name | Description | Type | Default |
|
||||
| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | ----------------------------------------------------------------------- |
|
||||
| `src` | image source, same as native. | `string` | — |
|
||||
| `fit` | indicate how the image should be resized to fit its container, same as [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit). | `'fill' \| 'contain' \| 'cover' \| 'none' \| 'scale-down'` | — |
|
||||
| `hide-on-click-modal` | when enabling preview, use this flag to control whether clicking on backdrop can exit preview mode. | `boolean` | `false` |
|
||||
| `loading` <VersionTag version="2.2.3" /> | Indicates how the browser should load the image, same as [native](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-loading) | `'eager' \| 'lazy'` | — |
|
||||
| `lazy` | whether to use lazy load. | `boolean` | `false` |
|
||||
| `scroll-container` | the container to add scroll listener when using lazy load. | `string \| HTMLElement` | the nearest parent container whose overflow property is auto or scroll. |
|
||||
| `alt` | native attribute `alt`. | `string` | — |
|
||||
| `referrer-policy` | native attribute `referrerPolicy`. | `string` | — |
|
||||
| `preview-src-list` | allow big image preview. | `string[]` | — |
|
||||
| `z-index` | set image preview z-index. | `number` | — |
|
||||
| `initial-index` | initial preview image index, less than the length of `url-list`. | `number` | `0` |
|
||||
| `close-on-press-escape` | whether the image-viewer can be closed by pressing ESC | `boolean` | `true` |
|
||||
| `preview-teleported` | whether to append image-viewer to body. A nested parent element attribute transform should have this attribute set to `true`. | `boolean` | `false` |
|
||||
|
||||
### Image Events
|
||||
|
||||
|
||||
@@ -117,37 +117,37 @@ input/length-limiting
|
||||
|
||||
## Input Attributes
|
||||
|
||||
| Name | Description | Type | Accepted Values | Default |
|
||||
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
||||
| type | type of input | string | text, textarea and other [native input types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types) | text |
|
||||
| modelValue / v-model | binding value | string / number | — | — |
|
||||
| maxlength | the max length | string / number | — | — |
|
||||
| minlength | same as `minlength` in native input | number | — | — |
|
||||
| show-word-limit | whether show word count, only works when `type` is 'text' or 'textarea' | boolean | — | false |
|
||||
| placeholder | placeholder of Input | string | — | — |
|
||||
| clearable | whether to show clear button | boolean | — | false |
|
||||
| formatter | specifies the format of the value presented input.(only works when `type` is 'text') | (value: string \| number) => string | — | — |
|
||||
| parser | specifies the value extracted from formatter input.(only works when `type` is 'text') | (string) => string | — | — |
|
||||
| show-password | whether to show toggleable password input | boolean | — | false |
|
||||
| disabled | whether Input is disabled | boolean | — | false |
|
||||
| size | size of Input, works when `type` is not 'textarea' | string | large / default / small | — |
|
||||
| prefix-icon | prefix icon component | `string \| Component` | — | — |
|
||||
| suffix-icon | suffix icon component | `string \| Component` | — | — |
|
||||
| rows | number of rows of textarea, only works when `type` is 'textarea' | number | — | 2 |
|
||||
| autosize | whether textarea has an adaptive height, only works when `type` is 'textarea'. Can accept an object, e.g. `{ minRows: 2, maxRows: 6 }` | boolean / object | — | false |
|
||||
| autocomplete | same as `autocomplete` in native input | string | — | off |
|
||||
| name | same as `name` in native input | string | — | — |
|
||||
| readonly | same as `readonly` in native input | boolean | — | false |
|
||||
| max | same as `max` in native input | — | — | — |
|
||||
| min | same as `min` in native input | — | — | — |
|
||||
| step | same as `step` in native input | — | — | — |
|
||||
| resize | control the resizability | string | none / both / horizontal / vertical | — |
|
||||
| autofocus | same as `autofocus` in native input | boolean | — | false |
|
||||
| form | same as `form` in native input | string | — | — |
|
||||
| label | label text | string | — | — |
|
||||
| tabindex | input tabindex | string / number | - | - |
|
||||
| validate-event | whether to trigger form validation | boolean | - | true |
|
||||
| input-style | the style of the input element or textarea element | object | - | {} |
|
||||
| Name | Description | Type | Accepted Values | Default |
|
||||
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
||||
| type | type of input | string | text, textarea and other [native input types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types) | text |
|
||||
| modelValue / v-model | binding value | string / number | — | — |
|
||||
| maxlength | the max length | string / number | — | — |
|
||||
| minlength | same as `minlength` in native input | number | — | — |
|
||||
| show-word-limit | whether show word count, only works when `type` is 'text' or 'textarea' | boolean | — | false |
|
||||
| placeholder | placeholder of Input | string | — | — |
|
||||
| clearable | whether to show clear button | boolean | — | false |
|
||||
| formatter | specifies the format of the value presented input.(only works when `type` is 'text') | `(value: string \| number) => string` | — | — |
|
||||
| parser | specifies the value extracted from formatter input.(only works when `type` is 'text') | `(string) => string` | — | — |
|
||||
| show-password | whether to show toggleable password input | boolean | — | false |
|
||||
| disabled | whether Input is disabled | boolean | — | false |
|
||||
| size | size of Input, works when `type` is not 'textarea' | string | large / default / small | — |
|
||||
| prefix-icon | prefix icon component | `string \| Component` | — | — |
|
||||
| suffix-icon | suffix icon component | `string \| Component` | — | — |
|
||||
| rows | number of rows of textarea, only works when `type` is 'textarea' | number | — | 2 |
|
||||
| autosize | whether textarea has an adaptive height, only works when `type` is 'textarea'. Can accept an object, e.g. `{ minRows: 2, maxRows: 6 }` | boolean / object | — | false |
|
||||
| autocomplete | same as `autocomplete` in native input | string | — | off |
|
||||
| name | same as `name` in native input | string | — | — |
|
||||
| readonly | same as `readonly` in native input | boolean | — | false |
|
||||
| max | same as `max` in native input | — | — | — |
|
||||
| min | same as `min` in native input | — | — | — |
|
||||
| step | same as `step` in native input | — | — | — |
|
||||
| resize | control the resizability | string | none / both / horizontal / vertical | — |
|
||||
| autofocus | same as `autofocus` in native input | boolean | — | false |
|
||||
| form | same as `form` in native input | string | — | — |
|
||||
| label | label text | string | — | — |
|
||||
| tabindex | input tabindex | string / number | - | - |
|
||||
| validate-event | whether to trigger form validation | boolean | - | true |
|
||||
| input-style | the style of the input element or textarea element | object | - | {} |
|
||||
|
||||
## Input Slots
|
||||
|
||||
|
||||
@@ -121,18 +121,18 @@ space/fill-ratio
|
||||
|
||||
## Space Attributes
|
||||
|
||||
| Name | Description | Type | Available value | Default |
|
||||
| ---------- | ------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------- | ---------- |
|
||||
| alignment | Controls the alignment of items | string | [align-items](https://developer.mozilla.org/en-US/docs/Web/CSS/align-items) | 'center' |
|
||||
| class | Classname | string / Array\<Record\<string, boolean\> \| String\> / Record\<string, boolean\> | - | - |
|
||||
| direction | Placement direction | string | vertical/horizontal | horizontal |
|
||||
| prefixCls | Prefix for space-items | string | el-space | - |
|
||||
| style | Extra style rules | string / Array\<Object \| String\> / Object | - | - |
|
||||
| spacer | Spacer | string / number / VNode | - | - |
|
||||
| size | Spacing size | string / number / [number, number] | - | 'small' |
|
||||
| wrap | Auto wrapping | boolean | true / false | false |
|
||||
| fill | Whether to fill the container | boolean | true / false | false |
|
||||
| fill-ratio | Ratio of fill | number | - | 100 |
|
||||
| Name | Description | Type | Available value | Default |
|
||||
| ---------- | ------------------------------- | ---------------------------------- | --------------------------------------------------------------------------- | ---------- |
|
||||
| alignment | Controls the alignment of items | string | [align-items](https://developer.mozilla.org/en-US/docs/Web/CSS/align-items) | 'center' |
|
||||
| class | Classname | string / Array / Object | - | - |
|
||||
| direction | Placement direction | string | vertical/horizontal | horizontal |
|
||||
| prefixCls | Prefix for space-items | string | el-space | - |
|
||||
| style | Extra style rules | string / Array / Object | - | - |
|
||||
| spacer | Spacer | string / number / VNode | - | - |
|
||||
| size | Spacing size | string / number / [number, number] | - | 'small' |
|
||||
| wrap | Auto wrapping | boolean | true / false | false |
|
||||
| fill | Whether to fill the container | boolean | true / false | false |
|
||||
| fill-ratio | Ratio of fill | number | - | 100 |
|
||||
|
||||
## Space Slot
|
||||
|
||||
|
||||
@@ -329,7 +329,7 @@ table/table-layout
|
||||
| label-class-name | class name of the label of this column | string | — | — |
|
||||
| selectable | function that determines if a certain row can be selected, works when `type` is 'selection' | function(row, index) | — | — |
|
||||
| reserve-selection | whether to reserve selection after data refreshing, works when `type` is 'selection'. Note that `row-key` is required for this to work | boolean | — | false |
|
||||
| filters | an array of data filtering options. For each element in this array, `text` and `value` are required | Array\<{text: string, value: string}\> | — | — |
|
||||
| filters | an array of data filtering options. For each element in this array, `text` and `value` are required | `Array<{text: string, value: string}>` | — | — |
|
||||
| filter-placement | placement for the filter dropdown | string | top / top-start / top-end / bottom / bottom-start / bottom-end / left / left-start / left-end / right / right-start / right-end | — |
|
||||
| filter-multiple | whether data filtering supports multiple options | boolean | — | true |
|
||||
| filter-method | data filtering method. If `filter-multiple` is on, this method will be called multiple times for each row, and a row will display if one of the calls returns `true` | function(value, row, column) | — | — |
|
||||
|
||||
@@ -142,32 +142,32 @@ tooltip/animations
|
||||
|
||||
## Attributes
|
||||
|
||||
| Name | Description | Type | Accepted Values | Default |
|
||||
| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------- | --------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
|
||||
| append-to | which element the tooltip CONTENT appends to | CSSSelector \| HTMLElement | — | #el-popper-container-[randomValue] |
|
||||
| effect | Tooltip theme, built-in theme: `dark` / `light` | string | string | dark |
|
||||
| content | display content, can be overridden by `slot#content` | String | — | — |
|
||||
| raw-content | whether `content` is treated as HTML string | boolean | — | false |
|
||||
| placement | position of Tooltip | string | top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end | bottom |
|
||||
| visible / v-model:visible | visibility of Tooltip | boolean | — | false |
|
||||
| disabled | whether Tooltip is disabled | boolean | — | false |
|
||||
| offset | offset of the Tooltip | number | — | 0 |
|
||||
| transition | animation name | string | — | el-fade-in-linear |
|
||||
| visible-arrow (will deprecate in 2.1.0 ) | whether an arrow is displayed. For more information, check [ElPopper](https://github.com/element-plus/element-plus/tree/dev/packages/components/popper) page | boolean | — | true |
|
||||
| popper-options | [popper.js](https://popper.js.org/docs/v2/) parameters | Object | refer to [popper.js](https://popper.js.org/docs/v2/) doc | `{modifiers: [{name: 'computeStyles',options: {gpuAcceleration: false}}]}` |
|
||||
| show-after | delay of appearance, in millisecond | number | — | 0 |
|
||||
| show-arrow | whether the tooltip content has an arrow | boolean | true / false | true |
|
||||
| hide-after | delay of disappear, in millisecond | number | — | 200 |
|
||||
| auto-close | timeout in milliseconds to hide tooltip | number | — | 0 |
|
||||
| manual | whether to control Tooltip manually. `mouseenter` and `mouseleave` won't have effects if set to `true` | boolean | — | false |
|
||||
| popper-class | custom class name for Tooltip's popper | string | — | — |
|
||||
| enterable | whether the mouse can enter the tooltip | Boolean | — | true |
|
||||
| tabindex | [tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of Tooltip | number | — | 0 |
|
||||
| teleported | whether tooltip content is teleported, if `true` it will be teleported to where `append-to` sets | boolean | true / false | true |
|
||||
| trigger | How should the tooltip be triggered (to show) | string | hover / click / focus / contextmenu | hover |
|
||||
| virtual-triggering | Indicates whether virtual triggering is enabled | boolean | — | false |
|
||||
| virtual-ref | Indicates the reference element to which the tooltip is attached | HTMLElement | — | — |
|
||||
| trigger-keys | When you click the mouse to focus on the trigger element, you can define a set of keyboard codes to control the display of tooltip through the keyboard | Array | — | `['Enter','Space']` |
|
||||
| Name | Description | Type | Accepted Values | Default |
|
||||
| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------- | --------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
|
||||
| append-to | which element the tooltip CONTENT appends to | `CSSSelector \| HTMLElement` | — | #el-popper-container-[randomValue] |
|
||||
| effect | Tooltip theme, built-in theme: `dark` / `light` | string | dark / light | dark |
|
||||
| content | display content, can be overridden by `slot#content` | String | — | — |
|
||||
| raw-content | whether `content` is treated as HTML string | boolean | — | false |
|
||||
| placement | position of Tooltip | string | top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end | bottom |
|
||||
| visible / v-model:visible | visibility of Tooltip | boolean | — | false |
|
||||
| disabled | whether Tooltip is disabled | boolean | — | false |
|
||||
| offset | offset of the Tooltip | number | — | 0 |
|
||||
| transition | animation name | string | — | el-fade-in-linear |
|
||||
| visible-arrow (will deprecate in 2.1.0 ) | whether an arrow is displayed. For more information, check [ElPopper](https://github.com/element-plus/element-plus/tree/dev/packages/components/popper) page | boolean | — | true |
|
||||
| popper-options | [popper.js](https://popper.js.org/docs/v2/) parameters | Object | refer to [popper.js](https://popper.js.org/docs/v2/) doc | `{modifiers: [{name: 'computeStyles',options: {gpuAcceleration: false}}]}` |
|
||||
| show-after | delay of appearance, in millisecond | number | — | 0 |
|
||||
| show-arrow | whether the tooltip content has an arrow | boolean | true / false | true |
|
||||
| hide-after | delay of disappear, in millisecond | number | — | 200 |
|
||||
| auto-close | timeout in milliseconds to hide tooltip | number | — | 0 |
|
||||
| manual | whether to control Tooltip manually. `mouseenter` and `mouseleave` won't have effects if set to `true` | boolean | — | false |
|
||||
| popper-class | custom class name for Tooltip's popper | string | — | — |
|
||||
| enterable | whether the mouse can enter the tooltip | Boolean | — | true |
|
||||
| tabindex | [tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of Tooltip | number | — | 0 |
|
||||
| teleported | whether tooltip content is teleported, if `true` it will be teleported to where `append-to` sets | boolean | true / false | true |
|
||||
| trigger | How should the tooltip be triggered (to show) | string | hover / click / focus / contextmenu | hover |
|
||||
| virtual-triggering | Indicates whether virtual triggering is enabled | boolean | — | false |
|
||||
| virtual-ref | Indicates the reference element to which the tooltip is attached | HTMLElement | — | — |
|
||||
| trigger-keys | When you click the mouse to focus on the trigger element, you can define a set of keyboard codes to control the display of tooltip through the keyboard | Array | — | `['Enter','Space']` |
|
||||
|
||||
## Slots
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ transfer/prop-alias
|
||||
| Name | Description | Type | Accepted Values | Default |
|
||||
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | ------------------------- | ------------------------------------------------------------------------- |
|
||||
| model-value / v-model | binding value | array | — | — |
|
||||
| data | data source | array\<{ key, label, disabled }\> | — | [ ] |
|
||||
| data | data source | `Array<{ key, label, disabled }>` | — | [ ] |
|
||||
| filterable | whether Transfer is filterable | boolean | — | false |
|
||||
| filter-placeholder | placeholder for the filter input | string | — | Enter keyword |
|
||||
| filter-method | custom filter method | function | — | — |
|
||||
@@ -56,8 +56,8 @@ transfer/prop-alias
|
||||
| titles | custom list titles | array | — | ['List 1', 'List 2'] |
|
||||
| button-texts | custom button texts | array | — | [ ] |
|
||||
| render-content | custom render function for data items | function(h, option) | — | — |
|
||||
| format | texts for checking status in list header | object`{noChecked, hasChecked}` | — | `{ noChecked: '${checked}/${total}', hasChecked: '${checked}/${total}' }` |
|
||||
| props | prop aliases for data source | object`{key, label, disabled}` | — | — |
|
||||
| format | texts for checking status in list header | `{ noChecked, hasChecked }` | — | `{ noChecked: '${checked}/${total}', hasChecked: '${checked}/${total}' }` |
|
||||
| props | prop aliases for data source | `{ key, label, disabled }` | — | — |
|
||||
| left-default-checked | key array of initially checked data items of the left list | array | — | [ ] |
|
||||
| right-default-checked | key array of initially checked data items of the right list | array | — | [ ] |
|
||||
| validate-event | whether to trigger form validation | boolean | - | true |
|
||||
|
||||
@@ -117,13 +117,13 @@ upload/manual
|
||||
| `file-list` / `v-model:file-list` | default uploaded files. | `UploadUserFile[]` | `[]` | No |
|
||||
| `list-type` | type of file list. | `'text' \| 'picture' \| 'picture-card'` | `'text'` | No |
|
||||
| `auto-upload` | whether to auto upload file. | `boolean` | `true` | No |
|
||||
| `http-request` | override default xhr behavior, allowing you to implement your own upload-file's request. | (options: UploadRequestOptions) => XMLHttpRequest \| Promise\<unknown\> | — | No |
|
||||
| `disabled` | whether to disable upload. | boolean | `false` | No |
|
||||
| `limit` | maximum number of uploads allowed. | number | — | No |
|
||||
| `http-request` | override default xhr behavior, allowing you to implement your own upload-file's request. | `(options: UploadRequestOptions) => XMLHttpRequest \| Promise<unknown>` | — | No |
|
||||
| `disabled` | whether to disable upload. | `boolean` | `false` | No |
|
||||
| `limit` | maximum number of uploads allowed. | `number` | — | No |
|
||||
|
||||
### Slots
|
||||
|
||||
| Name | Description | Scope |
|
||||
| Name | Description | Type |
|
||||
| --------- | ----------------------------------- | ---------------------- |
|
||||
| `default` | customize default content. | - |
|
||||
| `trigger` | content which triggers file dialog. | - |
|
||||
|
||||
Reference in New Issue
Block a user