升级vue2.7,this的使用
import {onMounted, ref,onUnmounted,getCurrentInstance } from 'vue' import router from "../router"; const { proxy } = getCurrentInstance() // import { useRoute,useRouter } from 'vue-router' // const router = useRouter() let getProduct=()=>{ // router.push('/product') proxy.$router.push('/product') }