Nie możesz wybrać więcej, niż 25 tematów
Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
35 wiersze
569 B
35 wiersze
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>
|
|
|