菜单项目支持 svg 图标
Former-commit-id: b3702e427c3b2d234cbdbb7f77464dfe208f20fb [formerly b3702e427c3b2d234cbdbb7f77464dfe208f20fb [formerly b3702e427c3b2d234cbdbb7f77464dfe208f20fb [formerly b3702e427c3b2d234cbdbb7f77464dfe208f20fb [formerly f9b19e9cdf0ec9d5c42aee32575adc01db8ab09e [formerly 4cf6aea5284279fdfb0502f5b0c7c5bb854827e6]]]]] Former-commit-id: d0d179e1590a38e5d5d375e6c37377b3b631e100 Former-commit-id: 2f0d716b8d8b712e722caa106af55eecacd13789 Former-commit-id: 4e12f33311ea1c7d9fe1561206e6617c11911703 [formerly 875af1eb6cdbbe7023bb19d0badec4c0e3a7e9f5] Former-commit-id: 496ddd4334d5496b8562cd94dd63b359852b9ffd Former-commit-id: 469b1d7d4ab423d6308e6b7208d8c2cfc9872224 Former-commit-id: 2761c79dbaab3c873afcde8e093e0b9b32d54a68 Former-commit-id: 0986feb8b02ed0c87a370f8925f8c0d111620c81 Former-commit-id: 30d6e70ee15350b3745df49b58161f700822511b
This commit is contained in:
@@ -1 +1 @@
|
|||||||
d08a658f8695d60d5eab3a4e0afa4e9e5f728c38
|
87fff7214e7b64123842f1f52b649a8af614eb46
|
||||||
@@ -1,6 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-menu-item :index="menu.path || uniqueId">
|
<el-menu-item :index="menu.path || uniqueId">
|
||||||
<i :class="`fa fa-${menu.icon || 'file-o'}`"></i>
|
<i v-if="menu.icon" :class="`fa fa-${menu.icon}`"></i>
|
||||||
|
<i v-else-if="menu.iconSvg">
|
||||||
|
<d2-icon-svg :name="menu.iconSvg"/>
|
||||||
|
</i>
|
||||||
|
<i v-else class="fa fa-file-o"></i>
|
||||||
<span slot="title">{{menu.title || '未命名菜单'}}</span>
|
<span slot="title">{{menu.title || '未命名菜单'}}</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-submenu :index="menu.path || uniqueId">
|
<el-submenu :index="menu.path || uniqueId">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<i :class="`fa fa-${menu.icon || 'folder-o'}`"></i>
|
<i v-if="menu.icon" :class="`fa fa-${menu.icon}`"></i>
|
||||||
|
<i v-else-if="menu.iconSvg">
|
||||||
|
<d2-icon-svg :name="menu.iconSvg"/>
|
||||||
|
</i>
|
||||||
|
<i v-else class="fa fa-folder-o"></i>
|
||||||
<span slot="title">{{menu.title}}</span>
|
<span slot="title">{{menu.title}}</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-for="(child, childIndex) in menu.children">
|
<template v-for="(child, childIndex) in menu.children">
|
||||||
|
|||||||
@@ -62,6 +62,24 @@ export const menuHeader = [
|
|||||||
{ title: '正在开发 2' },
|
{ title: '正在开发 2' },
|
||||||
{ title: '正在开发 3' }
|
{ title: '正在开发 3' }
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'svg 菜单图标',
|
||||||
|
iconSvg: 'd2admin',
|
||||||
|
children: [
|
||||||
|
{ title: 'add', iconSvg: 'add' },
|
||||||
|
{ title: 'alarm', iconSvg: 'alarm' },
|
||||||
|
{ title: 'camera', iconSvg: 'camera' },
|
||||||
|
{ title: 'history', iconSvg: 'history' },
|
||||||
|
{ title: 'like', iconSvg: 'like' },
|
||||||
|
{ title: 'love', iconSvg: 'love' },
|
||||||
|
{ title: 'message', iconSvg: 'message' },
|
||||||
|
{ title: 'notice', iconSvg: 'notice' },
|
||||||
|
{ title: 'search', iconSvg: 'search' },
|
||||||
|
{ title: 'share', iconSvg: 'share' },
|
||||||
|
{ title: 'star', iconSvg: 'star' },
|
||||||
|
{ title: 'user', iconSvg: 'user' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user