eff1c3921dbe4f49018a0ea7a9dfe64a47d6aabf.svn-base 497 B

1234567891011121314151617181920212223242526272829
  1. <script>
  2. export default {
  3. name: 'MenuItem',
  4. functional: true,
  5. props: {
  6. icon: {
  7. type: String,
  8. default: ''
  9. },
  10. title: {
  11. type: String,
  12. default: ''
  13. }
  14. },
  15. render(h, context) {
  16. const { icon, title } = context.props
  17. const vnodes = []
  18. if (icon) {
  19. vnodes.push(<svg-icon icon-class={icon}/>)
  20. }
  21. if (title) {
  22. vnodes.push(<span slot='title'>{(title)}</span>)
  23. }
  24. return vnodes
  25. }
  26. }
  27. </script>