修复引用节点滚动到可视区域没有生效的bug

This commit is contained in:
xu_yanfeng 2025-02-22 12:10:20 +08:00
parent bc2cbce8dd
commit ea9ce63853

View File

@ -41,7 +41,12 @@ export default defineComponent({
setup() { setup() {
const funcShowPlace = (data: EngineData) => { const funcShowPlace = (data: EngineData) => {
console.log(data); console.log(data);
_expand(data.engineNode); const uuid = data.engineNode;
nextTick(() => {
if (elTree.value) {
elTree.value.handExpand(uuid, { highlight: true, scroll: true } as HandExpandOptions);
}
});
}; };
const funcEnableSchedule = (b: boolean) => { const funcEnableSchedule = (b: boolean) => {
if (b) { if (b) {
@ -113,11 +118,6 @@ export default defineComponent({
bridge.off(Msg.InspectNode, onInspectNode); bridge.off(Msg.InspectNode, onInspectNode);
timer.clean(); timer.clean();
}); });
function _expand(uuid: string) {
if (elTree.value) {
elTree.value.handExpand(uuid, { highlight: true });
}
}
function updateTree() { function updateTree() {
console.log("update tree info"); console.log("update tree info");
const id = toRaw(frameID.value); const id = toRaw(frameID.value);