Fixed #5463 - Splitter/SplitterPanel: size not updated
parent
99ca28023a
commit
cd18096e89
|
@ -2,6 +2,7 @@
|
||||||
<div :class="cx('root')" :style="sx('root')" :data-p-resizing="false" v-bind="ptmi('root', getPTOptions)">
|
<div :class="cx('root')" :style="sx('root')" :data-p-resizing="false" v-bind="ptmi('root', getPTOptions)">
|
||||||
<template v-for="(panel, i) of panels" :key="i">
|
<template v-for="(panel, i) of panels" :key="i">
|
||||||
<component :is="panel" tabindex="-1"></component>
|
<component :is="panel" tabindex="-1"></component>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="i !== panels.length - 1"
|
v-if="i !== panels.length - 1"
|
||||||
ref="gutter"
|
ref="gutter"
|
||||||
|
@ -51,6 +52,20 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.initializePanels();
|
||||||
|
},
|
||||||
|
updated() {
|
||||||
|
this.initializePanels();
|
||||||
|
},
|
||||||
|
beforeUnmount() {
|
||||||
|
this.clear();
|
||||||
|
this.unbindMouseListeners();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
isSplitterPanel(child) {
|
||||||
|
return child.type.name === 'SplitterPanel';
|
||||||
|
},
|
||||||
|
initializePanels() {
|
||||||
if (this.panels && this.panels.length) {
|
if (this.panels && this.panels.length) {
|
||||||
let initialized = false;
|
let initialized = false;
|
||||||
|
|
||||||
|
@ -75,14 +90,6 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeUnmount() {
|
|
||||||
this.clear();
|
|
||||||
this.unbindMouseListeners();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
isSplitterPanel(child) {
|
|
||||||
return child.type.name === 'SplitterPanel';
|
|
||||||
},
|
|
||||||
onResizeStart(event, index, isKeyDown) {
|
onResizeStart(event, index, isKeyDown) {
|
||||||
this.gutterElement = event.currentTarget || event.target.parentElement;
|
this.gutterElement = event.currentTarget || event.target.parentElement;
|
||||||
this.size = this.horizontal ? DomHandler.getWidth(this.$el) : DomHandler.getHeight(this.$el);
|
this.size = this.horizontal ? DomHandler.getWidth(this.$el) : DomHandler.getHeight(this.$el);
|
||||||
|
|
Loading…
Reference in New Issue