From 33fa933808fa7d5747d4a651dab9f00dfcd68f4a Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Tue, 21 May 2019 14:51:08 +0300 Subject: [PATCH] zindex fixes to SplitButton --- src/components/splitbutton/SplitButton.vue | 36 ++++++++-- src/views/splitbutton/SplitButtonDoc.vue | 84 ++++++++++++---------- 2 files changed, 79 insertions(+), 41 deletions(-) diff --git a/src/components/splitbutton/SplitButton.vue b/src/components/splitbutton/SplitButton.vue index c43f7b74b..461433e6e 100644 --- a/src/components/splitbutton/SplitButton.vue +++ b/src/components/splitbutton/SplitButton.vue @@ -23,11 +23,34 @@ import DomHandler from '../utils/DomHandler'; export default { props: { - label: String, - icon: String, - model: Array, - disabled: Boolean, - tabindex: String + label: { + type: String, + default: null + }, + icon: { + type: String, + default: null + }, + model: { + type: Array, + default: null + }, + disabled: { + type: Boolean, + default: false + }, + tabindex: { + type: String, + default: null + }, + autoZIndex: { + type: Boolean, + default: true + }, + baseZIndex: { + type: Number, + default: 0 + }, }, data() { return { @@ -53,6 +76,9 @@ export default { event.preventDefault(); }, onOverlayEnter() { + if (this.autoZIndex) { + this.$refs.overlay.style.zIndex = String(this.baseZIndex + DomHandler.generateZIndex()); + } this.alignOverlay(); this.bindOutsideClickListener(); }, diff --git a/src/views/splitbutton/SplitButtonDoc.vue b/src/views/splitbutton/SplitButtonDoc.vue index c30f2d83f..a8c2ac67d 100644 --- a/src/views/splitbutton/SplitButtonDoc.vue +++ b/src/views/splitbutton/SplitButtonDoc.vue @@ -76,44 +76,56 @@ export default {
- - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
NameTypeDefaultDescription
labelstringnullText of the button.
iconstringnullName of the icon.
modelobjectnullMenuModel instance to define the overlay items.
disabledbooleanfalseWhen present, it specifies that the component should be disabled.
tabIndexstringnullIndex of the element in tabbing order.
labelstringnullText of the button.
iconstringnullName of the icon.
modelobjectnullMenuModel instance to define the overlay items.
disabledbooleanfalseWhen present, it specifies that the component should be disabled.
tabindexstringnullIndex of the element in tabbing order.
autoZIndexbooleantrueWhether to automatically manage layering.
baseZIndexnumber0Base zIndex value to use in layering.