mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 16:43:55 +00:00
26 lines
327 B
Vue
26 lines
327 B
Vue
|
<template>
|
||
|
<button @click="handleClick">
|
||
|
{{ label }}
|
||
|
</button>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
name: 'Button',
|
||
|
props: {
|
||
|
label: {
|
||
|
type: String,
|
||
|
required: true
|
||
|
}
|
||
|
},
|
||
|
data: () => ({
|
||
|
clicked: false
|
||
|
}),
|
||
|
methods: {
|
||
|
handleClick() {
|
||
|
this.clicked = true
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|