I have cascader which includes handleClick event. And when it is clicked, I want to send a value as true to parent component and in parent component I want to use it. So my child component:
<el-cascader
v-model="file"
@change="handleChange"
/>
methods: {
handleChange() {
this.$emit('is-file-changed', true);
},
}
And this is how I sent it to child component (so my parent component is like in below):
<file-selector v-model="contract.file" @is-file-changed="fileSelected" />
data() {
return {
fileSelected: false,
};
},
But it gives me an error saying [Vue warn]: Error in v-on handler: "TypeError: handler.apply is not a function"
I believe I sent it all right. So what I am doing wrong?