1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| <template>
| <div>无访问权限,请联系管理员</div>
| </template>
|
| <script setup>
| import { getCurrentInstance, onMounted } from "vue";
|
| const instance = getCurrentInstance();
| if (instance != null) {
| const _this = instance.appContext.config.globalProperties; //vue3获取当前this
|
| onMounted(() => {
| console.log(_this.$route.params);
| });
| }
| </script>
|
| <style scoped></style>
|
|