Fixed #814 - MenuItem: class does not apply to separator item
parent
1d0192813c
commit
a9a79a5980
|
@ -19,7 +19,7 @@
|
|||
<sub-menu :model="item.items" v-if="visible(item) && item.items" :key="item.label + '_sub_'"
|
||||
@leaf-click="onLeafClick" :parentActive="item === activeItem" />
|
||||
</li>
|
||||
<li class="p-menu-separator" :style="item.style" v-if="visible(item) && item.separator" :key="'separator' + i" role="separator"></li>
|
||||
<li :class="['p-menu-separator', item.class]" :style="item.style" v-if="visible(item) && item.separator" :key="'separator' + i" role="separator"></li>
|
||||
</template>
|
||||
</ul>
|
||||
</transition>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<span :class="getSubmenuIcon()" v-if="item.items"></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="p-menu-separator" :style="item.style" v-if="visible(item) && item.separator" :key="'separator' + i" role="separator"></li>
|
||||
<li :class="['p-menu-separator', item.class]" :style="item.style" v-if="visible(item) && item.separator" :key="'separator' + i" role="separator"></li>
|
||||
</template>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
<li class="p-submenu-header" :key="item.label+i" v-if="item.items">{{item.label}}</li>
|
||||
<template v-for="(child, j) of item.items">
|
||||
<Menuitem v-if="visible(child) && !child.separator" :key="child.label + i + j" :item="child" @click="itemClick" />
|
||||
<li v-else-if="visible(child) && child.separator" class="p-menu-separator" :style="child.style" :key="'separator' + i + j" role="separator"></li>
|
||||
<li v-else-if="visible(child) && child.separator" :class="['p-menu-separator', item.class]" :style="child.style" :key="'separator' + i + j" role="separator"></li>
|
||||
</template>
|
||||
</template>
|
||||
<li v-else-if="visible(item) && item.separator" class="p-menu-separator" :style="item.style" :key="'separator' + i" role="separator"></li>
|
||||
<li v-else-if="visible(item) && item.separator" :class="['p-menu-separator', item.class]" :style="item.style" :key="'separator' + i" role="separator"></li>
|
||||
<Menuitem v-else :key="item.label+i" :item="item" @click="itemClick" />
|
||||
</template>
|
||||
</ul>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<sub-menu :model="item.items" v-if="visible(item) && item.items" :key="item.label + '_sub_'" :mobileActive="mobileActive"
|
||||
@leaf-click="onLeafClick" @keydown-item="onChildItemKeyDown" :parentActive="item === activeItem" />
|
||||
</li>
|
||||
<li class="p-menu-separator" :style="item.style" v-if="visible(item) && item.separator" :key="'separator' + i" role="separator"></li>
|
||||
<li :class="['p-menu-separator', item.class]" :style="item.style" v-if="visible(item) && item.separator" :key="'separator' + i" role="separator"></li>
|
||||
</template>
|
||||
</ul>
|
||||
</template>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
</div>
|
||||
</transition>
|
||||
</li>
|
||||
<li class="p-menu-separator" :style="item.style" v-if="visible(item) && item.separator" :key="'separator' + i"></li>
|
||||
<li :class="['p-menu-separator', item.class]" :style="item.style" v-if="visible(item) && item.separator" :key="'separator' + i"></li>
|
||||
</template>
|
||||
</ul>
|
||||
</template>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<sub-menu :model="item.items" v-if="visible(item) && item.items" :key="item.label + '_sub_'"
|
||||
@leaf-click="onLeafClick" @keydown-item="onChildItemKeyDown" :parentActive="item === activeItem" />
|
||||
</li>
|
||||
<li class="p-menu-separator" :style="item.style" v-if="visible(item) && item.separator" :key="'separator' + i" role="separator"></li>
|
||||
<li :class="['p-menu-separator', item.class]" :style="item.style" v-if="visible(item) && item.separator" :key="'separator' + i" role="separator"></li>
|
||||
</template>
|
||||
</ul>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue