auth-web/src/layout/redirect.vue

25 lines
401 B
Vue
Raw Normal View History

2024-10-09 15:48:26 +08:00
<script lang="ts" setup>
import { unref } from 'vue';
import { useRouter } from 'vue-router';
2024-09-26 09:38:02 +08:00
defineOptions({
2024-10-09 15:48:26 +08:00
name: 'Redirect',
2024-09-26 09:38:02 +08:00
});
const { currentRoute, replace } = useRouter();
const { params, query } = unref(currentRoute);
const { path } = params;
2024-10-09 15:48:26 +08:00
const _path = Array.isArray(path) ? path.join('/') : path;
2024-09-26 09:38:02 +08:00
replace({
2024-10-09 15:48:26 +08:00
path: '/' + _path,
query,
2024-09-26 09:38:02 +08:00
});
</script>
<template>
2024-10-09 15:48:26 +08:00
<div />
2024-09-26 09:38:02 +08:00
</template>