微调
This commit is contained in:
@@ -6,8 +6,10 @@
|
||||
:props="defaultProps"
|
||||
style="width: 100%"
|
||||
:expand-on-click-node="false"
|
||||
:highlight-current="true"
|
||||
@node-click="handleNodeClick"
|
||||
show-checkbox
|
||||
show-checkbox
|
||||
@check-change="handleCheckChange"
|
||||
>
|
||||
<template #default="{ node, data }">
|
||||
<el-tooltip effect="dark" :content="data.sourceDesc || data.scriptTypeName" placement="top" :hide-after="0">
|
||||
@@ -38,6 +40,7 @@ const defaultProps = {
|
||||
const activeName = ref('')
|
||||
const childActiveName = ref('')
|
||||
const handleNodeClick = (data, node) => {
|
||||
console.log('handleNodeClick', data, node)
|
||||
let code = ['Base', 'VOL', 'Freq', 'Harm', 'Base_0_10', 'Base_20_85', 'Base_110_200']
|
||||
const parents = getParentNodes(node, [])
|
||||
parents.pop()
|
||||
@@ -92,7 +95,16 @@ function findTargetCodes(data: any[], targetCodes: string[]) {
|
||||
// return result
|
||||
}
|
||||
|
||||
onMounted(() => {})
|
||||
function handleCheckChange(data, checked) {
|
||||
if (checked) {
|
||||
// Uncheck all other nodes
|
||||
props.treeData.forEach((node) => {
|
||||
if (node.id !== data.id) {
|
||||
node.checked = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// // 对外映射
|
||||
// defineExpose({ init })
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user