<el-tree
ref="treeRef"
:data="dataTree"
:props="defaultProps"
node-key="id"
show-checkbox
default-expand-all
:check-strictly="true"
:default-checked-keys="check_id"
@check-change="handleNodeClick"
/>
父组件传过来的值
const props = defineProps<{
dialogEdit: boolean;
edittData: object;
ID: Array<string>;
}>();
let check_id = ref<string[]>([]);
watch(
() => props.dialogEdit,
() => {
dialogEdit.value = props.dialogEdit;
check_id.value = props.ID;
console.log("xxxxxxxxxx", check_id.value);
}
);