Uncaught TypeError: router.push is not a function
import?{defineComponent}?from?'vue'
import?{useRoute}?from?'vue-router'
export?default?defineComponent({
????name:?'Start',
????setup(){
????????let?router?=?useRoute()
????????let?start?=?()?=>?{
????????????router.push({
????????????????path:?'/home'
????????????})
????????}
????????return{
????????????start
????????}
????}
})
2021-12-22
useRoute改為useRouter就好了。