diff --git a/components/lib/menubar/Menubar.vue b/components/lib/menubar/Menubar.vue index 9a49711dd..7ccbf17da 100755 --- a/components/lib/menubar/Menubar.vue +++ b/components/lib/menubar/Menubar.vue @@ -39,6 +39,7 @@ :aria-labelledby="ariaLabelledby" :aria-label="ariaLabel" :pt="pt" + :unstyled="unstyled" @focus="onFocus" @blur="onBlur" @keydown="onKeyDown" @@ -88,6 +89,11 @@ export default { outsideClickListener: null, container: null, menubar: null, + beforeMount() { + if (!this.$slots.item) { + console.warn('In future versions, vue-router support will be removed. Item templating should be used.'); + } + }, mounted() { this.id = this.id || UniqueComponentId(); }, diff --git a/components/lib/menubar/MenubarSub.vue b/components/lib/menubar/MenubarSub.vue index c660250de..220fd1482 100755 --- a/components/lib/menubar/MenubarSub.vue +++ b/components/lib/menubar/MenubarSub.vue @@ -38,7 +38,7 @@ - + this.isItemVisible(processedItem) && this.getItemProp(processedItem, 'separator')).length + 1; + }, + getMenuItemProps(processedItem, index) { + return { + action: mergeProps( + { + class: this.cx('action'), + tabindex: -1, + 'aria-hidden': true + }, + this.getPTOptions(processedItem, index, 'action') + ), + icons: mergeProps( + { + class: [this.cx('icon'), this.getItemProp(processedItem, 'icon')] + }, + this.getPTOptions(processedItem, index, 'icon') + ), + label: mergeProps( + { + class: this.cx('label') + }, + this.getPTOptions(processedItem, index, 'label') + ), + submenuicon: mergeProps( + { + class: this.cx('submenuIcon') + }, + this.getPTOptions(processedItem, index, 'submenuIcon') + ) + }; } }, components: {