mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-11-30 02:08:12 +08:00
fix(components): [cascader] placeholder disappeared after clear value (#9190)
This commit is contained in:
parent
302e928c96
commit
6ac49834ef
@ -444,9 +444,7 @@ export default defineComponent({
|
||||
updatePopperPosition()
|
||||
nextTick(panel.value?.scrollToExpandingNode)
|
||||
} else if (props.filterable) {
|
||||
const { value } = presentText
|
||||
inputValue.value = value
|
||||
searchInputValue.value = value
|
||||
syncPresentTextValue()
|
||||
}
|
||||
|
||||
emit('visible-change', visible)
|
||||
@ -630,9 +628,18 @@ export default defineComponent({
|
||||
|
||||
const handleClear = () => {
|
||||
panel.value?.clearCheckedNodes()
|
||||
if (!popperVisible.value && props.filterable) {
|
||||
syncPresentTextValue()
|
||||
}
|
||||
togglePopperVisible(false)
|
||||
}
|
||||
|
||||
const syncPresentTextValue = () => {
|
||||
const { value } = presentText
|
||||
inputValue.value = value
|
||||
searchInputValue.value = value
|
||||
}
|
||||
|
||||
const handleSuggestionClick = (node: CascaderNode) => {
|
||||
const { checked } = node
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user