update 页面优化

This commit is contained in:
wangxinbo
2020-11-22 12:17:04 +08:00
parent b662833522
commit 3bbd9d4570
7 changed files with 359 additions and 273 deletions

View File

@ -1,29 +1,33 @@
<script>
export default {
name: 'MenuItem',
functional: true,
props: {
icon: {
type: String,
default: ''
},
title: {
type: String,
default: ''
}
},
render(h, context) {
const { icon, title } = context.props
const vnodes = []
if (icon) {
vnodes.push(<svg-icon icon-class={icon}/>)
}
if (title) {
vnodes.push(<span slot='title'>{(title)}</span>)
}
return vnodes
}
}
</script>
<script>
export default {
name: 'MenuItem',
functional: true,
props: {
icon: {
type: String,
default: ''
},
title: {
type: String,
default: ''
}
},
render(h, context) {
const { icon, title } = context.props
const vnodes = []
if (icon) {
vnodes.push(<svg-icon icon-class={icon}/>)
}
if (title) {
vnodes.push(
<el-tooltip slot='title' effect='dark' content={(title)} placement="bottom">
<span>{(title)}</span>
</el-tooltip>
)
}
return vnodes
}
}
</script>