[update] 添加图标,以及修改菜单图标

This commit is contained in:
lideqin
2023-09-08 14:59:20 +08:00
parent 90661d4c38
commit 139d6eb1a8
9 changed files with 163 additions and 10 deletions
+5
View File
@@ -144,6 +144,11 @@ export default {
}
/deep/ .icon-style {
max-width: 14px;
margin-right: 10px;
}
/* update_end author:sunjianlei date:20190509 for: 修改侧边导航栏滚动条的样式 */
</style>
+12 -5
View File
@@ -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 } }/>
)
}
}
},