Fixed #243 - Disabled menuitems with routerLink integration are still functional
parent
553639b313
commit
cd0136f088
|
@ -4,7 +4,7 @@
|
|||
<template v-for="(item, i) of model">
|
||||
<li role="none" :class="getItemClass(item)" :style="item.style" v-if="item.visible !== false && !item.separator" :key="item.label + i"
|
||||
@mouseenter="onItemMouseEnter($event, item)">
|
||||
<router-link v-if="item.to" :to="item.to" :class="getLinkClass(item)" @click.native="onItemClick($event, item)" role="menuitem">
|
||||
<router-link v-if="item.to && !item.disabled" :to="item.to" :class="getLinkClass(item)" @click.native="onItemClick($event, item)" role="menuitem">
|
||||
<span :class="['p-menuitem-icon', item.icon]"></span>
|
||||
<span class="p-menuitem-text">{{item.label}}</span>
|
||||
</router-link>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<li :class="getSubmenuHeaderClass(submenu)" :style="submenu.style" role="presentation">{{submenu.label}}</li>
|
||||
<template v-for="(item, i) of submenu.items">
|
||||
<li role="none" :class="getSubmenuItemClass(item)" :style="item.style" v-if="item.visible !== false && !item.separator" :key="item.label + i">
|
||||
<router-link v-if="item.to" :to="item.to" :class="getLinkClass(item)" @click.native="onLeafClick($event, item)" role="menuitem">
|
||||
<router-link v-if="item.to && !item.disabled" :to="item.to" :class="getLinkClass(item)" @click.native="onLeafClick($event, item)" role="menuitem">
|
||||
<span :class="['p-menuitem-icon', item.icon]"></span>
|
||||
<span class="p-menuitem-text">{{item.label}}</span>
|
||||
</router-link>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<li :class="containerClass" role="none" :style="item.style" v-if="item.visible !== false">
|
||||
<router-link v-if="item.to" :to="item.to" :class="linkClass" role="menuitem">
|
||||
<router-link v-if="item.to && !item.disabled" :to="item.to" :class="linkClass" role="menuitem">
|
||||
<span :class="['p-menuitem-icon', item.icon]"></span>
|
||||
<span class="p-menuitem-text">{{item.label}}</span>
|
||||
</router-link>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<template v-for="(item, i) of model">
|
||||
<li role="none" :class="getItemClass(item)" :style="item.style" v-if="item.visible !== false && !item.separator" :key="item.label + i"
|
||||
@mouseenter="onItemMouseEnter($event, item)">
|
||||
<router-link v-if="item.to" :to="item.to" :class="getLinkClass(item)"
|
||||
<router-link v-if="item.to && !item.disabled" :to="item.to" :class="getLinkClass(item)"
|
||||
@click.native="onItemClick($event, item)" @keydown.native="onItemKeyDown($event, item)" role="menuitem">
|
||||
<span :class="['p-menuitem-icon', item.icon]"></span>
|
||||
<span class="p-menuitem-text">{{item.label}}</span>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<template v-for="(item, i) of model">
|
||||
<li :class="getItemClass(item)" :style="item.style" v-if="item.visible !== false && !item.separator" :key="item.label + i"
|
||||
@mouseenter="onItemMouseEnter($event, item)" role="none">
|
||||
<router-link v-if="item.to" :to="item.to" :class="getLinkClass(item)"
|
||||
<router-link v-if="item.to && !item.disabled" :to="item.to" :class="getLinkClass(item)"
|
||||
@click.native="onItemClick($event, item)" @keydown.native="onItemKeyDown($event, item)" role="menuitem">
|
||||
<span :class="['p-menuitem-icon', item.icon]"></span>
|
||||
<span class="p-menuitem-text">{{item.label}}</span>
|
||||
|
|
Loading…
Reference in New Issue