problem description
I customized a cont component, then referenced it in another component A, and placed some content in the cont component. How do I define events? For example, click, my way of writing is not supported, what should the correct way of writing look like? Is there a boss who loses a portal? thank you
the environmental background of the problems and what methods you have tried
related codes
/ / A component
< cont >
< div @ click= "click" > < / div >
< / cont >
methods: {
click: () => {
console.log("")
}
},
/ / cont components
< template >
<div class="content">
<slot></slot>
</div>
< / template >