layout | title | label | permalink | nav_order | parent |
---|---|---|---|---|---|
page |
Bind an Event to a Web-Component |
Binding events |
/usage-web-components/events/ |
5 |
Usage |
<template>
<button @click="sayHi" name="the button">click</button>
<script>
export default class extends Lego {
sayHi(event) {
alert(`You clicked to says hi! 👋🏼`)
}
}
</script>