feat(station-card): show station ip address when click station name
This commit is contained in:
@@ -5,7 +5,7 @@ import { type StationAlarmCounts, type StationDevices } from '@/composables/quer
|
||||
import { ControlOutlined } from '@vicons/antd';
|
||||
import { Video as VideoIcon } from '@vicons/carbon';
|
||||
import axios from 'axios';
|
||||
import { NCard, NTag, NButton, NIcon, useThemeVars, NSpace, NFlex, NText } from 'naive-ui';
|
||||
import { NCard, NTag, NButton, NIcon, useThemeVars, NSpace, NFlex, NText, NTooltip } from 'naive-ui';
|
||||
import { toRefs, computed } from 'vue';
|
||||
|
||||
const props = defineProps<{
|
||||
@@ -95,7 +95,13 @@ const theme = useThemeVars();
|
||||
<template>
|
||||
<NCard bordered hoverable size="small" class="station-card" :header-style="{ padding: `6px` }" :content-style="{ padding: `0px 6px 6px 6px` }">
|
||||
<template #header>
|
||||
<span class="font-smaller">{{ station.name }}</span>
|
||||
<NTooltip v-if="station.ip" trigger="click">
|
||||
<template #trigger>
|
||||
<span class="font-smaller">{{ station.name }}</span>
|
||||
</template>
|
||||
<span>{{ station.ip }}</span>
|
||||
</NTooltip>
|
||||
<span v-else class="font-smaller">{{ station.name }}</span>
|
||||
</template>
|
||||
<template #header-extra>
|
||||
<NTag :type="station.online ? 'success' : 'error'" size="small">
|
||||
|
||||
Reference in New Issue
Block a user