You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
485 B
Plaintext
16 lines
485 B
Plaintext
import type { RouteLocationNormalized, RouteRecordNormalized } from "vue-router";
|
|
|
|
export function getRawRoute(route: RouteLocationNormalized): RouteLocationNormalized {
|
|
if (!route) return route;
|
|
const { matched, ...opt } = route;
|
|
return {
|
|
...opt,
|
|
matched: (matched
|
|
? matched.map((item) => ({
|
|
meta: item.meta,
|
|
name: item.name,
|
|
path: item.path,
|
|
}))
|
|
: undefined) as RouteRecordNormalized[],
|
|
};
|
|
} |