From 24d04539c3bac21f2b2a6617bb915b33826cc3ef Mon Sep 17 00:00:00 2001 From: ahao Date: Sat, 23 Sep 2023 23:12:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BD=BF=E7=94=A8propTypes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Sidebar/SidebarItem.vue | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index e7a6086..4fa3693 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -21,7 +21,7 @@ v-for="child in item.children" :key="child.path" :is-nest="true" - :item="child as RouteOption" + :item="child" :base-path="resolvePath(child.path)" class="nest-menu" /> @@ -34,15 +34,12 @@ import { isExternal } from '@/utils/validate' import AppLink from './Link.vue' import { getNormalPath } from '@/utils/ruoyi' import { RouteOption } from "vue-router"; -import { PropType } from "vue"; import { propTypes } from "@/utils/propTypes"; +import { object } from 'vue-types'; const props = defineProps({ // route object - item: { - type: Object as PropType, - required: true - }, + item: object().isRequired, isNest: propTypes.bool.def(false), basePath: propTypes.string.def('') })