Skip to content

Commit

Permalink
feat: 设置 icon: '' 可以取消默认的菜单图标
Browse files Browse the repository at this point in the history
Former-commit-id: d120f41c803d47690de8893477c756e6ffb83db2 [formerly d120f41c803d47690de8893477c756e6ffb83db2 [formerly d120f41c803d47690de8893477c756e6ffb83db2 [formerly d120f41c803d47690de8893477c756e6ffb83db2 [formerly 2f74974 [formerly 4e13189cb5c790327bfb4e2077f5c56f15435e5b]]]]]
Former-commit-id: 44d5e20
Former-commit-id: b2cce82
Former-commit-id: ff18a6bc3834a98e2e40d1c7b5d36ef2bc445cac [formerly 3b1706d464f22a040836545bd1c3b9d3615791b6]
Former-commit-id: e4ed2abcdedf4064d8a610e529e2deb9304f869c
Former-commit-id: 2268aacbbc45cd16be1db1eeecc59c0b86206afd
Former-commit-id: 92d4ed88a305128f919d14c1af2f3a164657bcc4
Former-commit-id: ac16e300526c7dcf20d84bc95347be9f8e11216d
Former-commit-id: 3a9646f02accd23e664068d42efa5b7d057889bc
  • Loading branch information
FairyEver committed Nov 16, 2018
1 parent 2a614a4 commit af5dc86
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<el-menu-item :index="menu.path || uniqueId">
<i v-if="menu.icon" :class="`fa fa-${menu.icon}`"></i>
<d2-icon-svg v-else-if="menu.iconSvg" :name="menu.iconSvg"/>
<i v-else class="fa fa-file-o"></i>
<i v-if="menu.icon === undefined" class="fa fa-file-o"></i>
<d2-icon-svg v-if="menu.iconSvg" :name="menu.iconSvg"/>
<span slot="title">{{menu.title || '未命名菜单'}}</span>
</el-menu-item>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<el-submenu :index="menu.path || uniqueId">
<template slot="title">
<i v-if="menu.icon" :class="`fa fa-${menu.icon}`"></i>
<d2-icon-svg v-else-if="menu.iconSvg" :name="menu.iconSvg"/>
<i v-else class="fa fa-folder-o"></i>
<i v-if="menu.icon === undefined" class="fa fa-folder-o"></i>
<d2-icon-svg v-if="menu.iconSvg" :name="menu.iconSvg"/>
<span slot="title">{{menu.title}}</span>
</template>
<template v-for="(child, childIndex) in menu.children">
Expand Down
22 changes: 11 additions & 11 deletions src/menu/modules/demo-components.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,32 @@ export default {
{
title: '填充型',
children: [
{ path: `${pre}container/full`, title: '基础' },
{ path: `${pre}container/full-slot`, title: '插槽' },
{ path: `${pre}container/full-bs`, title: '滚动优化' }
{ path: `${pre}container/full`, title: '基础', icon: '' },
{ path: `${pre}container/full-slot`, title: '插槽', icon: '' },
{ path: `${pre}container/full-bs`, title: '滚动优化', icon: '' }
]
},
{
title: '隐形模式',
children: [
{ path: `${pre}container/ghost`, title: '基础' },
{ path: `${pre}container/ghost-slot`, title: '插槽' },
{ path: `${pre}container/ghost-bs`, title: '滚动优化' }
{ path: `${pre}container/ghost`, title: '基础', icon: '' },
{ path: `${pre}container/ghost-slot`, title: '插槽', icon: '' },
{ path: `${pre}container/ghost-bs`, title: '滚动优化', icon: '' }
]
},
{
title: '卡片型',
children: [
{ path: `${pre}container/card`, title: '基础' },
{ path: `${pre}container/card-slot`, title: '插槽' },
{ path: `${pre}container/card-bs`, title: '滚动优化' }
{ path: `${pre}container/card`, title: '基础', icon: '' },
{ path: `${pre}container/card-slot`, title: '插槽', icon: '' },
{ path: `${pre}container/card-bs`, title: '滚动优化', icon: '' }
]
},
{
title: '方法',
children: [
{ path: `${pre}container/api?bs=false`, title: '滚动控制' },
{ path: `${pre}container/api?bs=true`, title: '滚动控制 BS' }
{ path: `${pre}container/api?bs=false`, title: '滚动控制', icon: '' },
{ path: `${pre}container/api?bs=true`, title: '滚动控制 BS', icon: '' }
]
}
]
Expand Down

0 comments on commit af5dc86

Please sign in to comment.