perf: optimize station card interaction

This commit is contained in:
yangsy
2025-08-25 10:31:51 +08:00
parent e67809ad86
commit d15c3c2edf

View File

@@ -9,7 +9,7 @@ import type { StationDevices } from '@/composables/query/use-line-devices-query'
import { ControlOutlined } from '@vicons/antd';
import { Video as VideoIcon } from '@vicons/carbon';
import axios from 'axios';
import { NCard, NStatistic, NTag, NGrid, NGi, NButton, NIcon, useThemeVars, NSpace } from 'naive-ui';
import { NCard, NStatistic, NTag, NGrid, NGi, NButton, NIcon, useThemeVars, NSpace, NTooltip } from 'naive-ui';
import { toRefs, computed, ref } from 'vue';
interface Props {
@@ -105,16 +105,30 @@ const theme = useThemeVars();
</template>
<template #default>
<NSpace>
<NTooltip trigger="hover">
<template #trigger>
<NButton text @click="openVideoPlatform">
<NIcon>
<VideoIcon />
</NIcon>
</NButton>
</template>
<template #default>
<span style="font-size: xx-small">打开视频平台</span>
</template>
</NTooltip>
<NTooltip trigger="hover">
<template #trigger>
<NButton text @click="openDeviceConfigModal">
<NIcon>
<ControlOutlined />
</NIcon>
</NButton>
</template>
<template #default>
<span style="font-size: xx-small">打开设备配置</span>
</template>
</NTooltip>
</NSpace>
<NGrid :cols="2" :style="{ opacity: online ? '1' : '0.3' }">
<NGi>