index.vue 821 B

12345678910111213141516171819202122232425262728
  1. <template>
  2. <n-space :vertical="true" :size="16">
  3. <n-card title="Tab Detail" :bordered="false" size="small" class="shadow-sm rounded-16px">
  4. <n-space :vertical="true" :size="12">
  5. <div>当前路由的描述数据(meta):</div>
  6. <div>{{ route.meta }}</div>
  7. <div>当前路由的查询数据(query):</div>
  8. <div>{{ route.query }}</div>
  9. <n-button @click="handleToTab">返回Tab</n-button>
  10. </n-space>
  11. </n-card>
  12. </n-space>
  13. </template>
  14. <script setup lang="ts">
  15. import { useRoute } from 'vue-router';
  16. import { routeName } from '@/router';
  17. import { useRouterPush } from '@/composables';
  18. const route = useRoute();
  19. const { routerPush } = useRouterPush();
  20. function handleToTab() {
  21. routerPush({ name: routeName('function_tab') });
  22. }
  23. </script>
  24. <style scoped></style>