| | |
| | | data: Tree, |
| | | checked: boolean, |
| | | indeterminate: boolean |
| | | ) => { |
| | | console.log(data, checked, indeterminate); |
| | | }; |
| | | ) => {}; |
| | | const onSubmit = () => { |
| | | if (!checkedStaste) { |
| | | return ElMessage.warning("请先点击选中相应图层"); |
| | |
| | | copyNode.nextSibling = { ...node.nextSibling }; |
| | | copyNode.parent = { ...node.parent }; |
| | | |
| | | // console.log(1111111111111, copyNode.previousSibling); |
| | | // console.log(2222222222222, copyNode.nextSibling); |
| | | // console.log(3333333333333, copyNode.parent); |
| | | if (Object.keys(copyNode.previousSibling).length !== 0) { |
| | | // 删除原先的node |
| | | treeRef.value.remove(node.data); |
| | |
| | | |
| | | // 处理节点点击事件 |
| | | function handleNodeClick(data: any) { |
| | | console.log(data); |
| | | |
| | | if (data.id === selectedNodeId.value) { |
| | | // 如果当前节点已经选中,则取消选中 |
| | | selectedNodeId.value = null; |