docs(components): [transfer] add transfer and transfer panel exposes (#18423)

This commit is contained in:
Lo 2024-10-01 11:34:21 +08:00 committed by GitHub
parent 68d57aff34
commit 2d098087fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 17 additions and 7 deletions

View File

@ -43,9 +43,9 @@ transfer/prop-alias
:::
## API
## Transfer API
### Attributes
### Transfer Attributes
| Name | Description | Type | Default |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | -------- |
@ -64,7 +64,7 @@ transfer/prop-alias
| right-default-checked | key array of initially checked data items of the right list | ^[object]`Array<string \| number>` | [] |
| validate-event | whether to trigger form validation | ^[boolean] | true |
### Events
### Transfer Events
| Name | Description | Type |
| ------------------ | ----------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
@ -72,7 +72,7 @@ transfer/prop-alias
| left-check-change | triggers when end user changes the checked state of any data item in the left list | ^[Function]`(value: TransferKey[], movedKeys?: TransferKey[]) => void` |
| right-check-change | triggers when end user changes the checked state of any data item in the right list | ^[Function]`(value: TransferKey[], movedKeys?: TransferKey[]) => void` |
### Slots
### Transfer Slots
| Name | Description |
| ------------ | ------------------------------------------------------------------ |
@ -80,11 +80,21 @@ transfer/prop-alias
| left-footer | content of left list footer |
| right-footer | content of right list footer |
### Exposes
### Transfer Exposes
| Method | Description | Type |
| Name | Description | Type |
| ---------- | ------------------------------------------- | ----------------------------------------------- |
| clearQuery | clear the filter keyword of a certain panel | ^[Function]`(which: TransferDirection) => void` |
| leftPanel | left panel ref | ^[object]`Ref<TransferPanelInstance>` |
| rightPanel | right panel ref | ^[object]`Ref<TransferPanelInstance>` |
## Transfer Panel API
### Transfer Panel Exposes
| Name | Description | Type |
| ----- | -------------- | --------- |
| query | filter keyword | ^[string] |
## Type Declarations

View File

@ -158,7 +158,7 @@ defineExpose({
clearQuery,
/** @description left panel ref */
leftPanel,
/** @description left panel ref */
/** @description right panel ref */
rightPanel,
})
</script>