0๐
โ
Iโm not able to test this now, but I believe $attrs and $listeners should do what you want to achieve or at least point you in the right direction:
<template>
<el-form v-bind="$attrs" v-on="$listeners" :label-position="labelPosition">
<slot />
</el-form>
</template>
0๐
You made a mistake in passing props like below:
<el-form v-bind="formProps" label-position=":labelPosition">
<slot />
</el-form>
In the above codes, label-position=":labelPosition"
is wrong.
It should be:label-position="labelPosition"
, so;
<el-form v-bind="formProps" :label-position="labelPosition">
<slot />
</el-form>
Source:stackexchange.com