vue-split-pane
vue-split-pane copied to clipboard
resize is not defined
I got this error:
Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.
I imported like this: import splitPane from 'vue-splitpane';
components : {
..
splitPane : splitPane
...
},
and making use of this template:
<split-pane v-on:resize="resize" :min-percent='20' :default-percent='30' split="vertical">
<template slot="paneL">
A
</template>
<template slot="paneR">
B
</template>
</split-pane>
Please advise
v-on:resize is the callback function when the pane is resized. In this example, the resize function is named "resize". You need to create this function in your methods if you wish to use it.