style: 更新图标库为 lucide

This commit is contained in:
yangsy
2026-01-13 11:10:12 +08:00
parent b392328f37
commit bd6ad9b932
11 changed files with 62 additions and 67 deletions

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 { parseErrorFeedback } from '@/utils';
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 { ChevronDownIcon, ChevronsLeftIcon, ChevronsRightIcon, ComputerIcon, LogOutIcon, LogsIcon, MapPinIcon, SettingsIcon, SirenIcon } from 'lucide-vue-next';
import {
NBadge,
NButton,
@@ -69,17 +69,17 @@ const menuOptions: MenuOption[] = [
{
label: () => h(RouterLink, { to: '/station' }, { default: () => '车站状态' }),
key: '/station',
icon: renderIcon(EnvironmentFilled),
icon: renderIcon(MapPinIcon),
},
{
label: () => h(RouterLink, { to: '/device' }, { default: () => '设备诊断' }),
key: '/device',
icon: renderIcon(HddFilled),
icon: renderIcon(ComputerIcon),
},
{
label: '设备告警',
key: '/alarm',
icon: renderIcon(AlertFilled),
icon: renderIcon(SirenIcon),
children: [
{
label: () => h(RouterLink, { to: '/alarm/alarm-log' }, { default: () => '设备告警记录' }),
@@ -94,7 +94,7 @@ const menuOptions: MenuOption[] = [
{
label: '系统日志',
key: '/log',
icon: renderIcon(FileTextFilled),
icon: renderIcon(LogsIcon),
children: [
{
label: () => h(RouterLink, { to: '/log/vimp-log' }, { default: () => '视频平台日志' }),
@@ -112,7 +112,7 @@ const dropdownOptions: DropdownOption[] = [
{
label: '退出登录',
key: 'logout',
icon: renderIcon(LogoutOutlined),
icon: renderIcon(LogOutIcon),
onClick: async () => {
try {
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" />
<NButton block quaternary :focusable="false" @click="onToggleMenuCollapsed">
<template #icon>
<NIcon :component="menuCollpased ? DoubleRightOutlined : DoubleLeftOutlined" />
<NIcon :component="menuCollpased ? ChevronsRightIcon : ChevronsLeftIcon" />
</template>
</NButton>
</NFlex>
@@ -201,13 +201,13 @@ function renderIcon(icon: Component): () => VNode {
<span>{{ userInfo?.nickName ?? '' }}</span>
</template>
<template #icon>
<NIcon :component="CaretDownFilled" />
<NIcon :component="ChevronDownIcon" />
</template>
</NButton>
</NDropdown>
<NButton quaternary :focusable="false" style="height: 100%" @click="openSettingsDrawer">
<template #icon>
<NIcon :component="SettingOutlined" />
<NIcon :component="SettingsIcon" />
</template>
</NButton>
</NFlex>
@@ -221,7 +221,7 @@ function renderIcon(icon: Component): () => VNode {
<NBadge :value="unreadAlarmCount">
<NButton secondary strong @click="routeToAlarmPage">
<template #icon>
<NIcon :component="AlertFilled" />
<NIcon :component="SirenIcon" />
</template>
</NButton>
</NBadge>