|
|
@ -65,13 +65,15 @@ export default defineComponent({ |
|
|
|
} |
|
|
|
|
|
|
|
onMounted(async ()=>{ |
|
|
|
commit('data/setMenu',{ |
|
|
|
key:props.basePath, |
|
|
|
item:{ |
|
|
|
name:(await props.item?.component?.())?.default.name, |
|
|
|
parentPath:props.item?.meta?.parentPath, |
|
|
|
} |
|
|
|
}) |
|
|
|
if(typeof props.item?.component==='function'){ |
|
|
|
commit('data/setMenu',{ |
|
|
|
key:props.basePath, |
|
|
|
item:{ |
|
|
|
name:(await props.item.component())?.default?.name, |
|
|
|
parentPath:props.item?.meta?.parentPath, |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
return _data; |
|
|
|
}, |
|
|
|