Cascader: fix default value is a string and cannot be deleted bug

pull/22577/head
Jiang 2023-06-26 01:06:08 +08:00
parent f14b5ba540
commit 3d8117c5be
1 changed files with 2 additions and 1 deletions

View File

@ -232,7 +232,8 @@ export default {
data() {
return {
dropDownVisible: false,
checkedValue: this.value,
// the value may be a string , causing the first deleting without the 'find' function
checkedValue: typeof this.value === 'string' ? [this.value] : this.value,
inputHover: false,
inputValue: null,
presentText: null,