@ -345,20 +345,9 @@ const handleToggleConnect = async (row: DeviceVO) => {
}
let timer: any = null;
/** 初始化 **/
onMounted(() => {
getList()
timer = setInterval(async () => {
const data = await DeviceApi.getDevicePage(queryParams)
list.value = data.list
total.value = data.total
}, 5000);
})
// 组件卸载时销毁图表
onUnmounted(() => {
if (timer) {
clearInterval(timer);
</script>