PanJiaChen / vue-split-pane

Split-Pane component built with vue2.0, can be split vertically or horizontally. http://panjiachen.github.io/split-pane/demo/index.html
553 stars 104 forks source link

Event 'resize' returns undefined / no data #14

Closed Inventsable closed 4 years ago

Inventsable commented 5 years ago

Hello, love how simple and easy to use this is, but I find the "resize" event emitted not very useful as I have to manually write in my own functionality every time. It would be great if it returned an Object with the current percentage of each pane instead!

notchris commented 5 years ago

I would also like to see this.

notchris commented 4 years ago

This is now the default behavior.

<split-pane @resize="resizeLeft($event)" ref="left" :min-percent='20' :default-percent='50' split="horizontal">

` `` javascript resizeLeft (p) { console.log(p); // The updated percent; this.$refs.right.percent = p; // You can update other panels by changing the percent property on a set ref. }