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 {
Name | -Type | -Default | -Description | -
---|---|---|---|
Name | +Type | +Default | +Description | +
label | -string | -null | -Text of the button. | -
icon | -string | -null | -Name of the icon. | -
model | -object | -null | -MenuModel instance to define the overlay items. | -
disabled | -boolean | -false | -When present, it specifies that the component should be disabled. | -
tabIndex | -string | -null | -Index of the element in tabbing order. | -
label | +string | +null | +Text of the button. | +
icon | +string | +null | +Name of the icon. | +
model | +object | +null | +MenuModel instance to define the overlay items. | +
disabled | +boolean | +false | +When present, it specifies that the component should be disabled. | +
tabindex | +string | +null | +Index of the element in tabbing order. | +
autoZIndex | +boolean | +true | +Whether to automatically manage layering. | +
baseZIndex | +number | +0 | +Base zIndex value to use in layering. | +