mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-12 07:17:13 +00:00
5c0d12fb13
* chore(examples): Add Jest + Vue Test Utils example * style: Lint * refactor: Rename button component & fix lint errors * refactor: Use export default * refactor: Babel 7 setup
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>
|