优化使用propTypes
This commit is contained in:
parent
9abd941eb5
commit
24d04539c3
@ -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<RouteOption>,
|
||||
required: true
|
||||
},
|
||||
item: object<RouteOption>().isRequired,
|
||||
isNest: propTypes.bool.def(false),
|
||||
basePath: propTypes.string.def('')
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user