feat: 添加图标库,更新菜单与页面标签中的icon相关功能与样式
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { defineComponent, type PropType } from 'vue';
|
||||
import { message } from 'ant-design-vue';
|
||||
import type { TabView } from '@/types';
|
||||
import { renderRouteIcon } from '@/utils/routeIcon';
|
||||
import styles from './PageTabs.module.less';
|
||||
|
||||
/**
|
||||
@@ -71,8 +72,11 @@ const PageTabs = defineComponent({
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
{/* 标签内容:hover 背景包裹文字 + 关闭按钮 */}
|
||||
{/* 标签内容:图标 + 文字 + 关闭按钮 */}
|
||||
<div class={styles.tabContent}>
|
||||
{tab.icon ? (
|
||||
<span class={styles.tabIcon}>{renderRouteIcon(tab.icon, { size: 14 })}</span>
|
||||
) : null}
|
||||
<div class={styles.tabTitle}>{tab.title}</div>
|
||||
<div class={styles.tabClose} onClick={(e: Event) => handleClose(tab.path, e)}>
|
||||
✕
|
||||
|
||||
Reference in New Issue
Block a user