vue router路由跳转
Quange.vue
<template>
<div id="Quange">
<p>{{msg}}</p>
<button type="button" @click="onClick">跳转</button>
</div>
</template>
<script>
export default {
name: 'Quange',
data() {
return {
msg: 'hello quange!'
}
},
methods: {
onClick() {
// 页面内跳转
// this.$router.push('/Furong');
this.$router.replace('/Furong');
console.log('onClick');
}
}
}
</script>
<style>
#Quange {
color: red;
}
</style>