您最多选择25个主题
主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
27 行
362 B
27 行
362 B
<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>
|
|
|