haoxuan
2023-11-03 6b027c18660b828ec7b57ad0e3f4ffca9f4d14d1
src/stores/devices.ts
@@ -3,6 +3,7 @@
import { getDeviceList } from '@/api'
import { useRequest } from 'vue-hooks-plus'
import type { Devices } from '@/api/device'
import { DEVICE_INFO_POLLING_DURATION } from '@/common/constants'
export const useDevicesStore = defineStore('device', () => {
  const deviceInfo = computed(() => {
@@ -18,7 +19,7 @@
    cancel: cancelDevicePolling
  } = useRequest(getDeviceList, {
    manual: true,
    pollingInterval: 6000,
    pollingInterval: DEVICE_INFO_POLLING_DURATION,
    pollingWhenHidden: false
  })