From fee9c5ef6c5338e552cad225b938ae07263fbe96 Mon Sep 17 00:00:00 2001 From: yangsy Date: Thu, 18 Dec 2025 20:49:15 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B8=B2=E6=9F=93=E5=85=A8=E7=BA=BF?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=A0=91=E6=97=B6=E8=87=AA=E5=8A=A8=E5=AE=9A?= =?UTF-8?q?=E4=BD=8D=E5=88=B0=E6=89=80=E9=80=89=E8=AE=BE=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/device/device-tree/device-tree.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/device/device-tree/device-tree.vue b/src/components/device/device-tree/device-tree.vue index a546100..966d818 100644 --- a/src/components/device/device-tree/device-tree.vue +++ b/src/components/device/device-tree/device-tree.vue @@ -460,6 +460,14 @@ const onLocateDeviceTree = async () => { animated.value = true; }; +// 渲染全线设备树时,若是首次选择设备,则定位设备树 +const unwatch = watch(selectedDevice, async (newDevice, oldDevice) => { + if (!!station.value) return; + if (!!newDevice && !oldDevice && !!deviceTreeInst.value) { + await onLocateDeviceTree(); + unwatch(); + } +});