<template>
  <div class="my">
    我的
    <!-- 编程式导航 -->
    <h3 @click="$router.push('/home')">笑笑</h3>
    <!-- <h3 @click="goToList">笑笑</h3> -->
    <button @click="$router.back()">后退</button>
    <button @click="$router.forward()">前进</button>
    <button @click="$router.go(-2)">按钮</button>
  </div>
</template>

<script>
export default {
  methods:{
    goToList() {
      // $router 编程式导航
      this.$router.replace('/home')
      // this.$router.push('/home')
    }
  }
}
</script>

<style>

</style>