在meteor中使用vue2.x
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

35 lines
569 B

<template>
<div>
<button @click="increment">Click Me</button>
<button @click="routeHandler">router page</button>
<button @click="goback">go back</button>
<p>You've pressed the button {{counter}} times.</p>
</div>
</template>
<script>
export default {
data() {
return {
counter: 0,
}
},
methods: {
increment() {
this.counter += 1
},
routeHandler(){
this.$router.push("/page")
},
goback(){
this.$router.go(-1)
}
},
}
</script>
<style scoped>
p {
font-family: serif;
}
</style>