Blame view

src/layout/components/Sidebar/Item.vue 390 Bytes
任超 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
<script>
export default {
  name: 'MenuItem',
  functional: true,
  props: {
    icon: {
      type: String,
      default: ''
    },
    title: {
      type: String,
      default: ''
    }
  },
  render (h, context) {
任超 committed
16
    const { title } = context.props
任超 committed
17 18 19 20 21 22 23 24
    const vnodes = []
    if (title) {
      vnodes.push(<span slot='title'>{(title)}</span>)
    }
    return vnodes
  }
}
</script>