style: 更新图标库为 lucide

This commit is contained in:
yangsy
2026-01-13 13:04:46 +08:00
parent 3606d6a971
commit 8a09c2312e
9 changed files with 48 additions and 48 deletions

View File

@@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { ClockCircleOutlined, CodeOutlined, FireOutlined, SaveOutlined } from '@vicons/antd'; import { ClockCheckIcon, CpuIcon, HardDriveIcon, MemoryStickIcon } from 'lucide-vue-next';
import { NCard, NFlex, NIcon, NProgress, type ProgressStatus } from 'naive-ui'; import { NCard, NFlex, NIcon, NProgress, type ProgressStatus } from 'naive-ui';
import { computed, toRefs } from 'vue'; import { computed, toRefs } from 'vue';
@@ -54,22 +54,22 @@ const getProgressStatus = (percent: number): ProgressStatus => {
<template #default> <template #default>
<NFlex vertical> <NFlex vertical>
<NFlex v-if="cpuUsage" style="width: 100%" align="center" :wrap="false"> <NFlex v-if="cpuUsage" style="width: 100%" align="center" :wrap="false">
<NIcon :component="FireOutlined" /> <NIcon :component="CpuIcon" />
<span style="word-break: keep-all">{{ cpuUsageLabel || 'CPU' }}</span> <span style="word-break: keep-all">{{ cpuUsageLabel || 'CPU' }}</span>
<NProgress :percentage="cpuPercent" :status="getProgressStatus(cpuPercent)">{{ cpuPercent }}%</NProgress> <NProgress :percentage="cpuPercent" :status="getProgressStatus(cpuPercent)">{{ cpuPercent }}%</NProgress>
</NFlex> </NFlex>
<NFlex v-if="memUsage" style="width: 100%" align="center" :wrap="false"> <NFlex v-if="memUsage" style="width: 100%" align="center" :wrap="false">
<NIcon :component="CodeOutlined" /> <NIcon :component="MemoryStickIcon" />
<span style="word-break: keep-all">{{ memUsageLabel || '内存' }}</span> <span style="word-break: keep-all">{{ memUsageLabel || '内存' }}</span>
<NProgress :percentage="memPercent" :status="getProgressStatus(memPercent)">{{ memPercent }}%</NProgress> <NProgress :percentage="memPercent" :status="getProgressStatus(memPercent)">{{ memPercent }}%</NProgress>
</NFlex> </NFlex>
<NFlex v-if="diskUsage" style="width: 100%" align="center" :wrap="false"> <NFlex v-if="diskUsage" style="width: 100%" align="center" :wrap="false">
<NIcon :component="SaveOutlined" /> <NIcon :component="HardDriveIcon" />
<span style="word-break: keep-all">{{ diskUsageLabel || '磁盘' }}</span> <span style="word-break: keep-all">{{ diskUsageLabel || '磁盘' }}</span>
<NProgress :percentage="diskPercent" :status="getProgressStatus(diskPercent)">{{ diskPercent }}%</NProgress> <NProgress :percentage="diskPercent" :status="getProgressStatus(diskPercent)">{{ diskPercent }}%</NProgress>
</NFlex> </NFlex>
<NFlex v-if="runningTime" style="width: 100%" align="center" :wrap="false"> <NFlex v-if="runningTime" style="width: 100%" align="center" :wrap="false">
<NIcon :component="ClockCircleOutlined" /> <NIcon :component="ClockCheckIcon" />
<span>{{ runningTimeLabel || '运行时间' }}</span> <span>{{ runningTimeLabel || '运行时间' }}</span>
<span>{{ formattedRunningTime }}</span> <span>{{ formattedRunningTime }}</span>
</NFlex> </NFlex>

View File

@@ -5,9 +5,9 @@ import { DEVICE_TYPE_LITERALS, DEVICE_TYPE_NAMES, tryGetDeviceType } from '@/enu
import { useDeviceStore } from '@/stores'; import { useDeviceStore } from '@/stores';
import { parseErrorFeedback } from '@/utils'; import { parseErrorFeedback } from '@/utils';
import { useMutation } from '@tanstack/vue-query'; import { useMutation } from '@tanstack/vue-query';
import { ApiOutlined, ReloadOutlined } from '@vicons/antd';
import { isCancel } from 'axios'; import { isCancel } from 'axios';
import destr from 'destr'; import destr from 'destr';
import { LinkIcon, RotateCwIcon } from 'lucide-vue-next';
import { NButton, NCard, NFlex, NIcon, NTag, NTooltip } from 'naive-ui'; import { NButton, NCard, NFlex, NIcon, NTag, NTooltip } from 'naive-ui';
import { storeToRefs } from 'pinia'; import { storeToRefs } from 'pinia';
import { computed, inject, onBeforeUnmount, ref, toRefs } from 'vue'; import { computed, inject, onBeforeUnmount, ref, toRefs } from 'vue';
@@ -152,7 +152,7 @@ onBeforeUnmount(() => {
<template #trigger> <template #trigger>
<NButton size="small" quaternary circle :loading="probing" @click="() => probeDevice()"> <NButton size="small" quaternary circle :loading="probing" @click="() => probeDevice()">
<template #icon> <template #icon>
<NIcon :component="ApiOutlined" /> <NIcon :component="LinkIcon" />
</template> </template>
</NButton> </NButton>
</template> </template>
@@ -164,7 +164,7 @@ onBeforeUnmount(() => {
<template #trigger> <template #trigger>
<NButton size="small" quaternary circle :loading="loading" @click="() => detailDevice()"> <NButton size="small" quaternary circle :loading="loading" @click="() => detailDevice()">
<template #icon> <template #icon>
<NIcon :component="ReloadOutlined" /> <NIcon :component="RotateCwIcon" />
</template> </template>
</NButton> </NButton>
</template> </template>

View File

@@ -4,9 +4,9 @@ import { exportRecordDiagCsv, transformRecordChecks } from '@/helpers';
import { useStationStore } from '@/stores'; import { useStationStore } from '@/stores';
import { parseErrorFeedback } from '@/utils'; import { parseErrorFeedback } from '@/utils';
import { useMutation } from '@tanstack/vue-query'; import { useMutation } from '@tanstack/vue-query';
import { DownloadOutlined, ReloadOutlined } from '@vicons/antd';
import { isCancel } from 'axios'; import { isCancel } from 'axios';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import { DownloadIcon, RotateCwIcon } from 'lucide-vue-next';
import { NButton, NCard, NFlex, NIcon, NPagination, NPopconfirm, NPopover, NRadioButton, NRadioGroup, NTooltip, useThemeVars } from 'naive-ui'; import { NButton, NCard, NFlex, NIcon, NPagination, NPopconfirm, NPopover, NRadioButton, NRadioGroup, NTooltip, useThemeVars } from 'naive-ui';
import { storeToRefs } from 'pinia'; import { storeToRefs } from 'pinia';
import { computed, onBeforeUnmount, onMounted, ref, toRefs, watch } from 'vue'; import { computed, onBeforeUnmount, onMounted, ref, toRefs, watch } from 'vue';
@@ -139,6 +139,7 @@ watch(
() => ndmDevice.value.id, () => ndmDevice.value.id,
(devieDbId) => { (devieDbId) => {
if (devieDbId) { if (devieDbId) {
recordChecks.value = [];
getRecordCheckByParentId(); getRecordCheckByParentId();
} }
}, },
@@ -170,7 +171,7 @@ onBeforeUnmount(() => {
<template #trigger> <template #trigger>
<NButton size="small" quaternary circle :loading="loading" @click="() => getRecordCheckByParentId()"> <NButton size="small" quaternary circle :loading="loading" @click="() => getRecordCheckByParentId()">
<template #icon> <template #icon>
<NIcon :component="ReloadOutlined" /> <NIcon :component="RotateCwIcon" />
</template> </template>
</NButton> </NButton>
</template> </template>
@@ -182,7 +183,7 @@ onBeforeUnmount(() => {
<template #trigger> <template #trigger>
<NButton size="small" quaternary circle @click="onExportRecordCheck"> <NButton size="small" quaternary circle @click="onExportRecordCheck">
<template #icon> <template #icon>
<NIcon :component="DownloadOutlined" /> <NIcon :component="DownloadIcon" />
</template> </template>
</NButton> </NButton>
</template> </template>

View File

@@ -17,11 +17,11 @@ import { SELECT_DEVICE_FN_INJECTION_KEY } from '@/constants';
import { useDeviceStore, useSettingStore } from '@/stores'; import { useDeviceStore, useSettingStore } from '@/stores';
import { parseErrorFeedback } from '@/utils'; import { parseErrorFeedback } from '@/utils';
import { useMutation } from '@tanstack/vue-query'; import { useMutation } from '@tanstack/vue-query';
import { PoweroffOutlined } from '@vicons/antd';
import { watchImmediate } from '@vueuse/core'; import { watchImmediate } from '@vueuse/core';
import { isCancel } from 'axios'; import { isCancel } from 'axios';
import destr from 'destr'; import destr from 'destr';
import { cloneDeep, isFunction } from 'es-toolkit'; import { cloneDeep, isFunction } from 'es-toolkit';
import { PowerIcon } from 'lucide-vue-next';
import { NButton, NCard, NDescriptions, NDescriptionsItem, NDropdown, NFlex, NIcon, NPopconfirm, NPopover, NSwitch, NTag, useThemeVars, type DropdownOption, type TagProps } from 'naive-ui'; import { NButton, NCard, NDescriptions, NDescriptionsItem, NDropdown, NFlex, NIcon, NPopconfirm, NPopover, NSwitch, NTag, useThemeVars, type DropdownOption, type TagProps } from 'naive-ui';
import { storeToRefs } from 'pinia'; import { storeToRefs } from 'pinia';
import { computed, inject, ref, toRefs } from 'vue'; import { computed, inject, ref, toRefs } from 'vue';
@@ -313,7 +313,7 @@ const { mutate: unlinkDevice } = useMutation({
<NFlex align="center"> <NFlex align="center">
<NTag class="pointer-cursor" size="small" :type="getCircuitStatusTagType(circuit)"> <NTag class="pointer-cursor" size="small" :type="getCircuitStatusTagType(circuit)">
<template #icon> <template #icon>
<NIcon :component="PoweroffOutlined" /> <NIcon :component="PowerIcon" />
</template> </template>
<template #default> <template #default>
<span>{{ getCircuitStatusText(circuit) }}</span> <span>{{ getCircuitStatusText(circuit) }}</span>

View File

@@ -1,6 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { ThunderboltOutlined } from '@vicons/antd'; import { DropletIcon, FanIcon, ShieldIcon, ThermometerIcon, ZapIcon } from 'lucide-vue-next';
import { ApertureOutline, LockOpenOutline, ThermometerOutline, WaterOutline } from '@vicons/ionicons5';
import { NCard, NFlex, NIcon, NTag } from 'naive-ui'; import { NCard, NFlex, NIcon, NTag } from 'naive-ui';
import { computed, toRefs } from 'vue'; import { computed, toRefs } from 'vue';
@@ -52,7 +51,7 @@ const formattedFanSpeeds = computed(() => {
<NFlex vertical> <NFlex vertical>
<NTag> <NTag>
<template #icon> <template #icon>
<NIcon :component="ThermometerOutline" /> <NIcon :component="ThermometerIcon" />
</template> </template>
<template #default> <template #default>
<span>温度: {{ temperature }}</span> <span>温度: {{ temperature }}</span>
@@ -60,7 +59,7 @@ const formattedFanSpeeds = computed(() => {
</NTag> </NTag>
<NTag> <NTag>
<template #icon> <template #icon>
<NIcon :component="WaterOutline" /> <NIcon :component="DropletIcon" />
</template> </template>
<template #default> <template #default>
<span>湿度: {{ humidity }}%</span> <span>湿度: {{ humidity }}%</span>
@@ -68,7 +67,7 @@ const formattedFanSpeeds = computed(() => {
</NTag> </NTag>
<NTag> <NTag>
<template #icon> <template #icon>
<NIcon :component="ApertureOutline" /> <NIcon :component="FanIcon" />
</template> </template>
<template #default> <template #default>
<span>风扇: {{ formattedFanSpeeds }}</span> <span>风扇: {{ formattedFanSpeeds }}</span>
@@ -76,7 +75,7 @@ const formattedFanSpeeds = computed(() => {
</NTag> </NTag>
<NTag :type="getStatusTagType(accessControlStatus)"> <NTag :type="getStatusTagType(accessControlStatus)">
<template #icon> <template #icon>
<NIcon :component="LockOpenOutline" /> <NIcon :component="ShieldIcon" />
</template> </template>
<template #default> <template #default>
<span>门禁: {{ accessControlStatus }}</span> <span>门禁: {{ accessControlStatus }}</span>
@@ -84,7 +83,7 @@ const formattedFanSpeeds = computed(() => {
</NTag> </NTag>
<NTag :type="getStatusTagType(lightningProtectionStatus)"> <NTag :type="getStatusTagType(lightningProtectionStatus)">
<template #icon> <template #icon>
<NIcon :component="ThunderboltOutlined" /> <NIcon :component="ZapIcon" />
</template> </template>
<template #default> <template #default>
<span>防雷: {{ lightningProtectionStatus }}</span> <span>防雷: {{ lightningProtectionStatus }}</span>

View File

@@ -5,12 +5,12 @@ import { NDM_ALARM_STORE_ID, NDM_DEVICE_STORE_ID, NDM_STATION_STORE_ID } from '@
import { usePollingStore, useSettingStore } from '@/stores'; import { usePollingStore, useSettingStore } from '@/stores';
import { downloadByData, getAppEnvConfig, parseErrorFeedback, sleep } from '@/utils'; import { downloadByData, getAppEnvConfig, parseErrorFeedback, sleep } from '@/utils';
import { useMutation } from '@tanstack/vue-query'; import { useMutation } from '@tanstack/vue-query';
import { DeleteOutlined, ExportOutlined, ImportOutlined } from '@vicons/antd';
import { useEventListener } from '@vueuse/core'; import { useEventListener } from '@vueuse/core';
import axios, { isCancel } from 'axios'; import axios, { isCancel } from 'axios';
import destr from 'destr'; import destr from 'destr';
import { isFunction } from 'es-toolkit'; import { isFunction } from 'es-toolkit';
import localforage from 'localforage'; import localforage from 'localforage';
import { DownloadIcon, Trash2Icon, UploadIcon } from 'lucide-vue-next';
import { NButton, NButtonGroup, NDivider, NDrawer, NDrawerContent, NDropdown, NFlex, NFormItem, NIcon, NInput, NInputNumber, NModal, NSwitch, NText, type DropdownOption } from 'naive-ui'; import { NButton, NButtonGroup, NDivider, NDrawer, NDrawerContent, NDropdown, NFlex, NFormItem, NIcon, NInput, NInputNumber, NModal, NSwitch, NText, type DropdownOption } from 'naive-ui';
import { storeToRefs } from 'pinia'; import { storeToRefs } from 'pinia';
import { ref, watch } from 'vue'; import { ref, watch } from 'vue';
@@ -336,7 +336,7 @@ const onDrawerAfterLeave = () => {
<NDropdown trigger="click" :options="exportDropdownOptions" @select="onSelectDropdownOption"> <NDropdown trigger="click" :options="exportDropdownOptions" @select="onSelectDropdownOption">
<NButton secondary size="small"> <NButton secondary size="small">
<template #icon> <template #icon>
<NIcon :component="ExportOutlined" /> <NIcon :component="DownloadIcon" />
</template> </template>
<template #default>导出</template> <template #default>导出</template>
</NButton> </NButton>
@@ -344,7 +344,7 @@ const onDrawerAfterLeave = () => {
<NDropdown trigger="click" :options="importDropdownOptions" @select="onSelectDropdownOption"> <NDropdown trigger="click" :options="importDropdownOptions" @select="onSelectDropdownOption">
<NButton secondary size="small"> <NButton secondary size="small">
<template #icon> <template #icon>
<NIcon :component="ImportOutlined" /> <NIcon :component="UploadIcon" />
</template> </template>
<template #default>导入</template> <template #default>导入</template>
</NButton> </NButton>
@@ -352,7 +352,7 @@ const onDrawerAfterLeave = () => {
<NDropdown trigger="click" :options="deleteDropdownOptions" @select="onSelectDropdownOption"> <NDropdown trigger="click" :options="deleteDropdownOptions" @select="onSelectDropdownOption">
<NButton secondary size="small"> <NButton secondary size="small">
<template #icon> <template #icon>
<NIcon :component="DeleteOutlined" /> <NIcon :component="Trash2Icon" />
</template> </template>
<template #default>删除</template> <template #default>删除</template>
</NButton> </NButton>

View File

@@ -1,10 +1,10 @@
<script setup lang="ts"> <script setup lang="ts">
import type { Station, StationAlarms, StationDevices } from '@/apis'; import type { Station, StationAlarms, StationDevices } from '@/apis';
import { DEVICE_TYPE_LITERALS } from '@/enums'; import { DEVICE_TYPE_LITERALS } from '@/enums';
import { EllipsisOutlined, MoreOutlined } from '@vicons/antd';
import axios from 'axios'; import axios from 'axios';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import { isFunction } from 'es-toolkit'; import { isFunction } from 'es-toolkit';
import { MoreHorizontalIcon, MoreVerticalIcon } from 'lucide-vue-next';
import { NButton, NCard, NCheckbox, NDropdown, NFlex, NIcon, NTag, NTooltip, useThemeVars, type DropdownOption } from 'naive-ui'; import { NButton, NCard, NCheckbox, NDropdown, NFlex, NIcon, NTag, NTooltip, useThemeVars, type DropdownOption } from 'naive-ui';
import { computed, toRefs } from 'vue'; import { computed, toRefs } from 'vue';
@@ -116,7 +116,7 @@ const onSelectDropdownOption = (key: string, option: DropdownOption) => {
<NDropdown trigger="click" :options="dropdownOptions" @select="onSelectDropdownOption"> <NDropdown trigger="click" :options="dropdownOptions" @select="onSelectDropdownOption">
<NButton quaternary size="tiny" :focusable="false"> <NButton quaternary size="tiny" :focusable="false">
<template #icon> <template #icon>
<NIcon :component="MoreOutlined" /> <NIcon :component="MoreVerticalIcon" />
</template> </template>
</NButton> </NButton>
</NDropdown> </NDropdown>
@@ -129,7 +129,7 @@ const onSelectDropdownOption = (key: string, option: DropdownOption) => {
<span>{{ deviceCount }} 台设备</span> <span>{{ deviceCount }} 台设备</span>
<NButton quaternary size="tiny" :focusable="false" @click="() => emit('clickDetail', 'device', station)"> <NButton quaternary size="tiny" :focusable="false" @click="() => emit('clickDetail', 'device', station)">
<template #icon> <template #icon>
<NIcon :component="EllipsisOutlined" /> <NIcon :component="MoreHorizontalIcon" />
</template> </template>
</NButton> </NButton>
</NFlex> </NFlex>
@@ -143,7 +143,7 @@ const onSelectDropdownOption = (key: string, option: DropdownOption) => {
<!-- 占位按钮对齐布局 --> <!-- 占位按钮对齐布局 -->
<NButton quaternary size="tiny" :focusable="false" style="visibility: hidden"> <NButton quaternary size="tiny" :focusable="false" style="visibility: hidden">
<template #icon> <template #icon>
<NIcon :component="EllipsisOutlined" /> <NIcon :component="MoreHorizontalIcon" />
</template> </template>
</NButton> </NButton>
</NFlex> </NFlex>
@@ -153,7 +153,7 @@ const onSelectDropdownOption = (key: string, option: DropdownOption) => {
<span :style="{ color: alarmCount > 0 ? themeVars.warningColor : '' }">今日 {{ alarmCount }} 条告警</span> <span :style="{ color: alarmCount > 0 ? themeVars.warningColor : '' }">今日 {{ alarmCount }} 条告警</span>
<NButton quaternary size="tiny" :focusable="false" @click="() => emit('clickDetail', 'alarm', station)"> <NButton quaternary size="tiny" :focusable="false" @click="() => emit('clickDetail', 'alarm', station)">
<template #icon> <template #icon>
<NIcon :component="EllipsisOutlined" /> <NIcon :component="MoreHorizontalIcon" />
</template> </template>
</NButton> </NButton>
</NFlex> </NFlex>

View File

@@ -1,11 +1,11 @@
<script setup lang="ts"> <script setup lang="ts">
import { watchDebounced } from '@vueuse/core';
import { NFlex, NIcon, NList, NListItem, NModal, NScrollbar, NStatistic, NText, NThing } from 'naive-ui';
import { computed, ref, toRefs } from 'vue';
import { useStationStore } from '@/stores';
import { storeToRefs } from 'pinia';
import type { Station, SyncCameraResult } from '@/apis'; import type { Station, SyncCameraResult } from '@/apis';
import { DeleteFilled, EditFilled, PlusCircleFilled } from '@vicons/antd'; import { useStationStore } from '@/stores';
import { watchDebounced } from '@vueuse/core';
import { EditIcon, PlusCircleIcon, Trash2Icon } from 'lucide-vue-next';
import { NFlex, NIcon, NList, NListItem, NModal, NScrollbar, NStatistic, NText, NThing } from 'naive-ui';
import { storeToRefs } from 'pinia';
import { computed, ref, toRefs } from 'vue';
const props = defineProps<{ const props = defineProps<{
syncCameraResult: Record<Station['code'], SyncCameraResult>; syncCameraResult: Record<Station['code'], SyncCameraResult>;
@@ -61,19 +61,19 @@ const syncList = computed(() => {
<NFlex justify="space-around" :size="24" style="margin-top: 8px"> <NFlex justify="space-around" :size="24" style="margin-top: 8px">
<NStatistic label="新增"> <NStatistic label="新增">
<template #prefix> <template #prefix>
<NIcon :component="PlusCircleFilled" /> <NIcon :component="PlusCircleIcon" />
</template> </template>
{{ insertList.length }} {{ insertList.length }}
</NStatistic> </NStatistic>
<NStatistic label="更新"> <NStatistic label="更新">
<template #prefix> <template #prefix>
<NIcon :component="EditFilled" /> <NIcon :component="EditIcon" />
</template> </template>
{{ updateList.length }} {{ updateList.length }}
</NStatistic> </NStatistic>
<NStatistic label="删除"> <NStatistic label="删除">
<template #prefix> <template #prefix>
<NIcon :component="DeleteFilled" /> <NIcon :component="Trash2Icon" />
</template> </template>
{{ deleteList.length }} {{ deleteList.length }}
</NStatistic> </NStatistic>

View File

@@ -5,8 +5,8 @@ import { LINE_ALARMS_QUERY_KEY, LINE_DEVICES_QUERY_KEY, LINE_STATIONS_MUTATION_K
import { useAlarmStore, useSettingStore, useUserStore } from '@/stores'; import { useAlarmStore, useSettingStore, useUserStore } from '@/stores';
import { parseErrorFeedback } from '@/utils'; import { parseErrorFeedback } from '@/utils';
import { useIsFetching, useIsMutating, useMutation } from '@tanstack/vue-query'; import { useIsFetching, useIsMutating, useMutation } from '@tanstack/vue-query';
import { AlertFilled, CaretDownFilled, DoubleLeftOutlined, DoubleRightOutlined, EnvironmentFilled, FileTextFilled, HddFilled, LogoutOutlined, SettingOutlined } from '@vicons/antd';
import { isCancel } from 'axios'; import { isCancel } from 'axios';
import { ChevronDownIcon, ChevronsLeftIcon, ChevronsRightIcon, ComputerIcon, LogOutIcon, LogsIcon, MapPinIcon, SettingsIcon, SirenIcon } from 'lucide-vue-next';
import { import {
NBadge, NBadge,
NButton, NButton,
@@ -69,17 +69,17 @@ const menuOptions: MenuOption[] = [
{ {
label: () => h(RouterLink, { to: '/station' }, { default: () => '车站状态' }), label: () => h(RouterLink, { to: '/station' }, { default: () => '车站状态' }),
key: '/station', key: '/station',
icon: renderIcon(EnvironmentFilled), icon: renderIcon(MapPinIcon),
}, },
{ {
label: () => h(RouterLink, { to: '/device' }, { default: () => '设备诊断' }), label: () => h(RouterLink, { to: '/device' }, { default: () => '设备诊断' }),
key: '/device', key: '/device',
icon: renderIcon(HddFilled), icon: renderIcon(ComputerIcon),
}, },
{ {
label: '设备告警', label: '设备告警',
key: '/alarm', key: '/alarm',
icon: renderIcon(AlertFilled), icon: renderIcon(SirenIcon),
children: [ children: [
{ {
label: () => h(RouterLink, { to: '/alarm/alarm-log' }, { default: () => '设备告警记录' }), label: () => h(RouterLink, { to: '/alarm/alarm-log' }, { default: () => '设备告警记录' }),
@@ -94,7 +94,7 @@ const menuOptions: MenuOption[] = [
{ {
label: '系统日志', label: '系统日志',
key: '/log', key: '/log',
icon: renderIcon(FileTextFilled), icon: renderIcon(LogsIcon),
children: [ children: [
{ {
label: () => h(RouterLink, { to: '/log/vimp-log' }, { default: () => '视频平台日志' }), label: () => h(RouterLink, { to: '/log/vimp-log' }, { default: () => '视频平台日志' }),
@@ -112,7 +112,7 @@ const dropdownOptions: DropdownOption[] = [
{ {
label: '退出登录', label: '退出登录',
key: 'logout', key: 'logout',
icon: renderIcon(LogoutOutlined), icon: renderIcon(LogOutIcon),
onClick: async () => { onClick: async () => {
try { try {
await userStore.userLogout(); await userStore.userLogout();
@@ -181,7 +181,7 @@ function renderIcon(icon: Component): () => VNode {
<NMenu :collapsed="menuCollpased" :collapsed-width="64" :collapsed-icon-size="20" :value="route.path" :options="menuOptions" /> <NMenu :collapsed="menuCollpased" :collapsed-width="64" :collapsed-icon-size="20" :value="route.path" :options="menuOptions" />
<NButton block quaternary :focusable="false" @click="onToggleMenuCollapsed"> <NButton block quaternary :focusable="false" @click="onToggleMenuCollapsed">
<template #icon> <template #icon>
<NIcon :component="menuCollpased ? DoubleRightOutlined : DoubleLeftOutlined" /> <NIcon :component="menuCollpased ? ChevronsRightIcon : ChevronsLeftIcon" />
</template> </template>
</NButton> </NButton>
</NFlex> </NFlex>
@@ -201,13 +201,13 @@ function renderIcon(icon: Component): () => VNode {
<span>{{ userInfo?.nickName ?? '' }}</span> <span>{{ userInfo?.nickName ?? '' }}</span>
</template> </template>
<template #icon> <template #icon>
<NIcon :component="CaretDownFilled" /> <NIcon :component="ChevronDownIcon" />
</template> </template>
</NButton> </NButton>
</NDropdown> </NDropdown>
<NButton quaternary :focusable="false" style="height: 100%" @click="openSettingsDrawer"> <NButton quaternary :focusable="false" style="height: 100%" @click="openSettingsDrawer">
<template #icon> <template #icon>
<NIcon :component="SettingOutlined" /> <NIcon :component="SettingsIcon" />
</template> </template>
</NButton> </NButton>
</NFlex> </NFlex>
@@ -221,7 +221,7 @@ function renderIcon(icon: Component): () => VNode {
<NBadge :value="unreadAlarmCount"> <NBadge :value="unreadAlarmCount">
<NButton secondary strong @click="routeToAlarmPage"> <NButton secondary strong @click="routeToAlarmPage">
<template #icon> <template #icon>
<NIcon :component="AlertFilled" /> <NIcon :component="SirenIcon" />
</template> </template>
</NButton> </NButton>
</NBadge> </NBadge>