fix: route Type

This commit is contained in:
wang_fan_w 2024-04-16 23:57:17 +08:00
parent f81163aca8
commit 300a73fe63
4 changed files with 11 additions and 8 deletions

View File

@ -18,12 +18,15 @@
<script setup lang="ts"> <script setup lang="ts">
import IconCommon from "@/layout/components/Menu/icon-common.vue"; import IconCommon from "@/layout/components/Menu/icon-common.vue";
import { RouteRecordRaw } from "vue-router";
defineOptions({ name: "MenuItem" }); defineOptions({ name: "MenuItem" });
const props = defineProps({
routeTree: { interface Props {
type: Array, routeTree: RouteRecordRaw[];
default: () => []
} }
const props = withDefaults(defineProps<Props>(), {
routeTree: () => []
}); });
</script> </script>

View File

@ -1,3 +1,4 @@
import { RouteRecordRaw } from "vue-router";
/** /**
* path路径与文件夹名称相同便 * path路径与文件夹名称相同便
* *
@ -21,13 +22,13 @@
* *
*/ */
export const dynamicRoutes = [ export const dynamicRoutes: RouteRecordRaw[] = [
{ {
path: "/", path: "/",
name: "/", name: "/",
redirect: "/home", redirect: "/home",
component: () => import("@/layout/index.vue"), // 容器布局-顶层路由 component: () => import("@/layout/index.vue"), // 容器布局-顶层路由
meat: { meta: {
isKeepAlive: true isKeepAlive: true
}, },
// 二级路由-主要渲染页面 // 二级路由-主要渲染页面

View File

@ -1,5 +1,4 @@
import { defineStore } from "pinia"; import { defineStore } from "pinia";
/** /**
* *
* @methods setAccount * @methods setAccount

0
src/typings/global.d.ts vendored Normal file
View File