[update] 添加图标,以及修改菜单图标
This commit is contained in:
@@ -144,6 +144,11 @@ export default {
|
||||
|
||||
}
|
||||
|
||||
/deep/ .icon-style {
|
||||
max-width: 14px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
/* update_end author:sunjianlei date:20190509 for: 修改侧边导航栏滚动条的样式 */
|
||||
</style>
|
||||
|
||||
|
||||
@@ -179,11 +179,18 @@ export default {
|
||||
if (icon === 'none' || icon === undefined) {
|
||||
return null
|
||||
}
|
||||
const props = {}
|
||||
typeof (icon) === 'object' ? props.component = icon : props.type = icon
|
||||
return (
|
||||
<Icon {... { props } }/>
|
||||
)
|
||||
if (icon && icon.split('-')[0] === 'icon') {
|
||||
console.log(icon.split('-')[0])
|
||||
return (
|
||||
<i class={'iconfont ' + icon + ' icon-style'}/>
|
||||
)
|
||||
} else {
|
||||
const props = {}
|
||||
typeof (icon) === 'object' ? props.component = icon : props.type = icon
|
||||
return (
|
||||
<Icon {... { props } }/>
|
||||
)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user