feat: 渲染全线设备树时自动定位到所选设备
This commit is contained in:
@@ -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();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user