教师端仓库迁移1020

This commit is contained in:
陆光LG
2025-10-20 15:37:28 +08:00
commit 73ca9d314c
2204 changed files with 337282 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
<template>
<div></div>
</template>
<script lang="ts" setup>
import { useRouter } from 'vue-router'
import { unref } from 'vue'
defineOptions({ name: 'Redirect' })
const { currentRoute, replace } = useRouter()
const { params, query } = unref(currentRoute)
const { path, _redirect_type = 'path' } = params
Reflect.deleteProperty(params, '_redirect_type')
Reflect.deleteProperty(params, 'path')
const _path = Array.isArray(path) ? path.join('/') : path
if (_redirect_type === 'name') {
replace({
name: _path,
query,
params
})
} else {
replace({
path: _path.startsWith('/') ? _path : '/' + _path,
query
})
}
</script>