1、script:
import { onMounted, getCurrentInstance, ref } from 'vue'
2、setup:
const { proxy } = getCurrentInstance();
3、页面加载打印:
onMounted(()=>{ console.log(proxy); console.log(proxy.$router.options.routes); });
2023-10-31 16:28:10
1、script:
import { onMounted, getCurrentInstance, ref } from 'vue'
2、setup:
const { proxy } = getCurrentInstance();
3、页面加载打印:
onMounted(()=>{ console.log(proxy); console.log(proxy.$router.options.routes); });