<script setup lang="ts">
import { reactive, ref, onMounted } from 'vue';
import {
  listCacheName,
  listCacheKey,
  getCacheValue,
  clearCacheName,
  clearCacheKey,
  clearCacheSafe,
} from '@/api/monitor/cache';
import { PageContainer } from 'antdv-pro-layout';
import { ColumnsType } from 'ant-design-vue/lib/table/Table';
import { message } from 'ant-design-vue/lib';
import { hasPermissions } from '@/plugins/auth-user';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { WS, OptionsType } from '@/plugins/ws-websocket';
import useI18n from '@/hooks/useI18n';
const { t } = useI18n();
onMounted(() => {
  const options: OptionsType = {
    params: {
      subGroupID: '1005',
    },
    onmessage: ev => {
      // 接收数据后回调
      console.log(ev);
    },
    onerror: (ev: any) => {
      // 接收数据后回调
      console.log(ev);
    },
    // 保活周期 10s
    heartTimer: 0,
    // 断线重连
    reconnectTimer: 0,
  };
  const ws = new WS(options);
});
</script>

<template>
  <div></div>
</template>

<style lang="less" scoped></style>
