fix-bug -- 使用TreeSelect组件后,重置按钮无法置空该组件值
| | |
| | | function initHandle() {
|
| | | nextTick(() => {
|
| | | const selectedValue = valueId.value;
|
| | | if(selectedValue !== null && typeof (selectedValue) !== "undefined"){
|
| | | if(selectedValue && selectedValue !== null && typeof (selectedValue) !== "undefined"){
|
| | | const node = proxy.$refs.selectTree.getNode(selectedValue)
|
| | | if (node) {
|
| | | valueTitle.value = node.data[props.objMap.label]
|
| | | proxy.$refs.selectTree.setCurrentKey(selectedValue) // 设置默认选中
|
| | | defaultExpandedKey.value = [selectedValue] // 设置默认展开
|
| | | }
|
| | | }else{
|
| | | clearHandle()
|
| | | }
|
| | | })
|
| | | }
|