how do I set default values (handlers) for custom events of the parent component after Vue inherits the component?
I have made a single-file component, which inherits the Table component of iview. I want to set a default value for the custom event "on-sort-change" of this component.
my code:
<script>
import { Table } from "iview"
export default {
name: "YTable",
extends: Table,
props:{
border:{type:Boolean,default:true},
stripe:{type:Boolean,default:true},
},
methods: {
//@on-sort-change
sortChange()
{
console.log("mySort:i am run");
},
},
};
</script>