feat(projects): 新增子菜单图标和多页签图标
This commit is contained in:
parent
a1a57a185c
commit
f5c56c355c
@ -12,7 +12,8 @@ const routes: AuthRoute.Route[] = [
|
|||||||
component: 'self',
|
component: 'self',
|
||||||
meta: {
|
meta: {
|
||||||
title: '分析页',
|
title: '分析页',
|
||||||
requiresAuth: true
|
requiresAuth: true,
|
||||||
|
icon: 'icon-park-outline:analysis'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -22,7 +23,8 @@ const routes: AuthRoute.Route[] = [
|
|||||||
meta: {
|
meta: {
|
||||||
title: '工作台',
|
title: '工作台',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
permissions: ['super', 'admin']
|
permissions: ['super', 'admin'],
|
||||||
|
icon: 'icon-park-outline:workbench'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -43,7 +45,8 @@ const routes: AuthRoute.Route[] = [
|
|||||||
component: 'self',
|
component: 'self',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'vue文档',
|
title: 'vue文档',
|
||||||
requiresAuth: true
|
requiresAuth: true,
|
||||||
|
icon: 'mdi:vuejs'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -52,7 +55,8 @@ const routes: AuthRoute.Route[] = [
|
|||||||
component: 'self',
|
component: 'self',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'vue文档(新版)',
|
title: 'vue文档(新版)',
|
||||||
requiresAuth: true
|
requiresAuth: true,
|
||||||
|
icon: 'mdi:vuejs'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -61,7 +65,8 @@ const routes: AuthRoute.Route[] = [
|
|||||||
component: 'self',
|
component: 'self',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'vite文档',
|
title: 'vite文档',
|
||||||
requiresAuth: true
|
requiresAuth: true,
|
||||||
|
icon: 'simple-icons:vite'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -70,7 +75,8 @@ const routes: AuthRoute.Route[] = [
|
|||||||
component: 'self',
|
component: 'self',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'naive文档',
|
title: 'naive文档',
|
||||||
requiresAuth: true
|
requiresAuth: true,
|
||||||
|
icon: 'mdi:alpha-n-box-outline'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -79,6 +85,7 @@ const routes: AuthRoute.Route[] = [
|
|||||||
meta: {
|
meta: {
|
||||||
title: '项目文档(外链)',
|
title: '项目文档(外链)',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
|
icon: 'mdi:file-link-outline',
|
||||||
href: 'https://docs.soybean.pro/'
|
href: 'https://docs.soybean.pro/'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -100,7 +107,8 @@ const routes: AuthRoute.Route[] = [
|
|||||||
component: 'self',
|
component: 'self',
|
||||||
meta: {
|
meta: {
|
||||||
title: '按钮',
|
title: '按钮',
|
||||||
requiresAuth: true
|
requiresAuth: true,
|
||||||
|
icon: 'ic:baseline-radio-button-checked'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -109,7 +117,8 @@ const routes: AuthRoute.Route[] = [
|
|||||||
component: 'self',
|
component: 'self',
|
||||||
meta: {
|
meta: {
|
||||||
title: '卡片',
|
title: '卡片',
|
||||||
requiresAuth: true
|
requiresAuth: true,
|
||||||
|
icon: 'mdi:card-outline'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -118,7 +127,8 @@ const routes: AuthRoute.Route[] = [
|
|||||||
component: 'self',
|
component: 'self',
|
||||||
meta: {
|
meta: {
|
||||||
title: '表格',
|
title: '表格',
|
||||||
requiresAuth: true
|
requiresAuth: true,
|
||||||
|
icon: 'mdi:table-large'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -139,7 +149,8 @@ const routes: AuthRoute.Route[] = [
|
|||||||
component: 'self',
|
component: 'self',
|
||||||
meta: {
|
meta: {
|
||||||
title: '地图',
|
title: '地图',
|
||||||
requiresAuth: true
|
requiresAuth: true,
|
||||||
|
icon: 'mdi:map'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -148,7 +159,8 @@ const routes: AuthRoute.Route[] = [
|
|||||||
component: 'self',
|
component: 'self',
|
||||||
meta: {
|
meta: {
|
||||||
title: '视频',
|
title: '视频',
|
||||||
requiresAuth: true
|
requiresAuth: true,
|
||||||
|
icon: 'mdi:video'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -161,7 +173,9 @@ const routes: AuthRoute.Route[] = [
|
|||||||
path: '/plugin/editor/quill',
|
path: '/plugin/editor/quill',
|
||||||
component: 'self',
|
component: 'self',
|
||||||
meta: {
|
meta: {
|
||||||
title: '富文本编辑器'
|
title: '富文本编辑器',
|
||||||
|
requiresAuth: true,
|
||||||
|
icon: 'mdi:file-document-edit-outline'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -169,13 +183,15 @@ const routes: AuthRoute.Route[] = [
|
|||||||
path: '/plugin/editor/markdown',
|
path: '/plugin/editor/markdown',
|
||||||
component: 'self',
|
component: 'self',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'markdown编辑器'
|
title: 'markdown编辑器',
|
||||||
|
requiresAuth: true,
|
||||||
|
icon: 'ri:markdown-line'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
meta: {
|
meta: {
|
||||||
title: '编辑器',
|
title: '编辑器',
|
||||||
requiresAuth: true
|
icon: 'icon-park-outline:editor'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -184,7 +200,8 @@ const routes: AuthRoute.Route[] = [
|
|||||||
component: 'self',
|
component: 'self',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'Swiper插件',
|
title: 'Swiper插件',
|
||||||
requiresAuth: true
|
requiresAuth: true,
|
||||||
|
icon: 'simple-icons:swiper'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -193,7 +210,8 @@ const routes: AuthRoute.Route[] = [
|
|||||||
component: 'self',
|
component: 'self',
|
||||||
meta: {
|
meta: {
|
||||||
title: '剪贴板',
|
title: '剪贴板',
|
||||||
requiresAuth: true
|
requiresAuth: true,
|
||||||
|
icon: 'mdi:clipboard-outline'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -202,7 +220,8 @@ const routes: AuthRoute.Route[] = [
|
|||||||
component: 'self',
|
component: 'self',
|
||||||
meta: {
|
meta: {
|
||||||
title: '图标',
|
title: '图标',
|
||||||
requiresAuth: true
|
requiresAuth: true,
|
||||||
|
icon: 'ic:baseline-insert-emoticon'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -211,7 +230,8 @@ const routes: AuthRoute.Route[] = [
|
|||||||
component: 'self',
|
component: 'self',
|
||||||
meta: {
|
meta: {
|
||||||
title: '打印',
|
title: '打印',
|
||||||
requiresAuth: true
|
requiresAuth: true,
|
||||||
|
icon: 'ic:baseline-local-printshop'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -232,7 +252,8 @@ const routes: AuthRoute.Route[] = [
|
|||||||
component: 'self',
|
component: 'self',
|
||||||
meta: {
|
meta: {
|
||||||
title: '异常页403',
|
title: '异常页403',
|
||||||
requiresAuth: true
|
requiresAuth: true,
|
||||||
|
icon: 'ic:baseline-block'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -241,7 +262,8 @@ const routes: AuthRoute.Route[] = [
|
|||||||
component: 'self',
|
component: 'self',
|
||||||
meta: {
|
meta: {
|
||||||
title: '异常页404',
|
title: '异常页404',
|
||||||
requiresAuth: true
|
requiresAuth: true,
|
||||||
|
icon: 'ic:baseline-web-asset-off'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -250,7 +272,8 @@ const routes: AuthRoute.Route[] = [
|
|||||||
component: 'self',
|
component: 'self',
|
||||||
meta: {
|
meta: {
|
||||||
title: '异常页500',
|
title: '异常页500',
|
||||||
requiresAuth: true
|
requiresAuth: true,
|
||||||
|
icon: 'ic:baseline-wifi-off'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -276,7 +299,8 @@ const routes: AuthRoute.Route[] = [
|
|||||||
component: 'self',
|
component: 'self',
|
||||||
meta: {
|
meta: {
|
||||||
title: '二级菜单',
|
title: '二级菜单',
|
||||||
requiresAuth: true
|
requiresAuth: true,
|
||||||
|
icon: 'ic:outline-menu'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -290,17 +314,20 @@ const routes: AuthRoute.Route[] = [
|
|||||||
component: 'self',
|
component: 'self',
|
||||||
meta: {
|
meta: {
|
||||||
title: '三级菜单',
|
title: '三级菜单',
|
||||||
requiresAuth: true
|
requiresAuth: true,
|
||||||
|
icon: 'ic:outline-menu'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
meta: {
|
meta: {
|
||||||
title: '二级菜单(有子菜单)'
|
title: '二级菜单(有子菜单)',
|
||||||
|
icon: 'ic:outline-menu'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
meta: {
|
meta: {
|
||||||
title: '一级菜单'
|
title: '一级菜单',
|
||||||
|
icon: 'ic:outline-menu'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
@close="tab.removeTab(item.path)"
|
@close="tab.removeTab(item.path)"
|
||||||
@contextmenu="handleContextMenu($event, item.path)"
|
@contextmenu="handleContextMenu($event, item.path)"
|
||||||
>
|
>
|
||||||
|
<Icon v-if="item.meta.icon" :icon="item.meta.icon" class="inline-block align-text-bottom mr-4px text-16px" />
|
||||||
{{ item.meta.title }}
|
{{ item.meta.title }}
|
||||||
</component>
|
</component>
|
||||||
</div>
|
</div>
|
||||||
@ -28,6 +29,7 @@
|
|||||||
import { ref, reactive, computed, nextTick, watch } from 'vue';
|
import { ref, reactive, computed, nextTick, watch } from 'vue';
|
||||||
import { useEventListener } from '@vueuse/core';
|
import { useEventListener } from '@vueuse/core';
|
||||||
import { ChromeTab, ButtonTab } from 'soybean-admin-tab';
|
import { ChromeTab, ButtonTab } from 'soybean-admin-tab';
|
||||||
|
import { Icon } from '@iconify/vue';
|
||||||
import { useThemeStore, useTabStore } from '@/store';
|
import { useThemeStore, useTabStore } from '@/store';
|
||||||
import { setTabRoutes } from '@/utils';
|
import { setTabRoutes } from '@/utils';
|
||||||
import { ContextMenu } from './components';
|
import { ContextMenu } from './components';
|
||||||
|
Loading…
Reference in New Issue
Block a user