Skip to content

Commit 06c4436

Browse files
committed
constant
1 parent 4e19485 commit 06c4436

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/SlideoutPanel/index.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ function isString(val) {
1313
return typeof val === 'string';
1414
}
1515
16+
const Z_INDEX_BASE = 100;
17+
1618
const vm = {
1719
name: 'slideout-panel',
1820
components: {},
@@ -30,7 +32,7 @@ const vm = {
3032
},
3133
panelTopVisibleZindex() {
3234
const visiblePanels = this.panels.filter(panel => panel.visible);
33-
return (visiblePanels.length > 0) ? Math.max(...visiblePanels.map(panel => panel.styles['z-index'])) : 100;
35+
return (visiblePanels.length > 0) ? Math.max(...visiblePanels.map(panel => panel.styles['z-index'])) : Z_INDEX_BASE;
3436
}
3537
},
3638
methods: {
@@ -93,7 +95,7 @@ const vm = {
9395
}
9496
9597
panel.styles = {
96-
'z-index': this.panels.length + 100
98+
'z-index': this.panels.length + Z_INDEX_BASE
9799
};
98100
99101
if (panel.openOn === 'top' || panel.openOn === 'bottom') {

0 commit comments

Comments
 (0)