fix(vue-renderless): [cascader] fix cascade component multiple selection configuration emitPath: false does not echo the selected name (#844)

* fix: cascader组件多选 配置 emitPath:false之后不回显选中名称

* fix(vue-renderless): [cascader] fix cascader组件多选 配置 emitPath:false之后不回显选中名称

* fix(vue-renderless): [cascader] fix cascader组件多选 配置 emitPath:false之后不回显选中名称
This commit is contained in:
falcon-jin 2023-11-23 09:36:19 +08:00 committed by GitHub
parent 9ea7373a0a
commit 515887975b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -328,8 +328,12 @@ export const getCheckedNodes =
return flag
}
for (let i = 0; i < checkedValue.length; i++) {
if (Array.isArray(checkedValue[i]) && checkedValue[i].length) {
flag = checkedValue[i][checkedValue[i].length - 1] === str
if (Array.isArray(checkedValue[i]) ) {
if (checkedValue[i].length) {
flag = checkedValue[i][checkedValue[i].length - 1] === str
}
} else {
flag = checkedValue[i] === str
}
if (flag) {