feat: add scoped slot for icon in menu.js;

新增:为 menus.js 的 icon 增加 scoped slot API;
master
iczer 4 years ago
parent 58784c81fd
commit 3b3cd76e51
  1. 2
      src/components/menu/menu.js

@ -120,7 +120,7 @@ export default {
},
methods: {
renderIcon: function (h, icon, key) {
if (this.$scopedSlots.icon) {
if (this.$scopedSlots.icon && icon && icon !== 'none') {
return this.$scopedSlots.icon({icon, key})
}
return !icon || icon == 'none' ? null : h(Icon, {props: {type: icon}})

Loading…
Cancel
Save