修改空指针

dev
zhaokai 2025-08-19 16:02:34 +08:00
parent 55a1517d55
commit cfd1f0736c
1 changed files with 1 additions and 2 deletions

View File

@ -78,8 +78,7 @@ const change = () => {
};
const getCheckedNodes = () => {
return cascaderRef.value
.getCheckedNodes()[0]
.pathLabels.join(props.joinSeparator);
.getCheckedNodes()?.[0]?.pathLabels?.join(props.joinSeparator) || "";
};
defineExpose({
getCheckedNodes,