菜单项目支持 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,6 +1,10 @@
|
||||
<template>
|
||||
<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>
|
||||
</el-menu-item>
|
||||
</template>
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
<template>
|
||||
<el-submenu :index="menu.path || uniqueId">
|
||||
<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>
|
||||
</template>
|
||||
<template v-for="(child, childIndex) in menu.children">
|
||||
|
||||
Reference in New Issue
Block a user