You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 rivejä
362 B
28 rivejä
362 B
4 vuotta sitten
|
<template>
|
||
|
<div>
|
||
|
<button @click="increment">Click Me</button>
|
||
|
<p>You've pressed the button {{counter}} times.</p>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
data() {
|
||
|
return {
|
||
|
counter: 0,
|
||
|
}
|
||
|
},
|
||
|
methods: {
|
||
|
increment() {
|
||
|
this.counter += 1
|
||
|
}
|
||
|
},
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style scoped>
|
||
|
p {
|
||
|
font-family: serif;
|
||
|
}
|
||
|
</style>
|