mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-02 03:08:21 +08:00
feat(components): [cascader] add persistent props to cascader to improve performace (#17526)
* feat: add persistent props to cascader to improve performace * chore: update doc
This commit is contained in:
parent
d913ba74c8
commit
38a4b0ac8c
@ -162,6 +162,7 @@ cascader/panel
|
||||
| max-collapse-tags ^(2.3.10) | The max tags number to be shown. To use this, `collpase-tags` must be true | ^[number] | 1 |
|
||||
| empty-values ^(2.7.0) | empty values of component, [see config-provider](/en-US/component/config-provider#empty-values-configurations) | ^[array] | — |
|
||||
| value-on-clear ^(2.7.0) | clear return value, [see config-provider](/en-US/component/config-provider#empty-values-configurations) | ^[string] / ^[number] / ^[boolean] / ^[Function] | — |
|
||||
| persistent ^(2.7.8) | when dropdown is inactive and `persistent` is `false`, dropdown will be destroyed | ^[boolean] | true |
|
||||
|
||||
### Cascader Events
|
||||
|
||||
|
@ -110,6 +110,13 @@ export const cascaderProps = buildProps({
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
/**
|
||||
* @description when dropdown is inactive and `persistent` is `false`, dropdown will be destroyed
|
||||
*/
|
||||
persistent: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
...useEmptyValuesProps,
|
||||
})
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
:transition="`${nsCascader.namespace.value}-zoom-in-top`"
|
||||
effect="light"
|
||||
pure
|
||||
persistent
|
||||
:persistent="persistent"
|
||||
@hide="hideSuggestionPanel"
|
||||
>
|
||||
<template #default>
|
||||
|
Loading…
Reference in New Issue
Block a user