Skip to content

Commit

Permalink
fix: qiankun props 异常
Browse files Browse the repository at this point in the history
  • Loading branch information
winixt committed Oct 10, 2022
1 parent a92480d commit 081bddc
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export function genMount(mountElementId) {
}
hasMountedAtLeastOnce = true;
cacheAppPromise.then((app)=>{
if(!cache[props.name]) {
if(props?.name && !cache[props.name]) {
cache[props.name] = app;
}
})
Expand Down
36 changes: 19 additions & 17 deletions packages/fes-runtime/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
export { Plugin } from './es/index'

export {
useRoute,
useRouter,
onBeforeRouteUpdate,
onBeforeRouteLeave,
RouterLink,
RouterView,
useLink,
createWebHashHistory,
createWebHistory,
createMemoryHistory,
createRouter,
} from 'vue-router';

declare module "@fesjs/fes" {
export {
useRoute,
useRouter,
onBeforeRouteUpdate,
onBeforeRouteLeave,
RouterLink,
RouterView,
useLink,
createWebHashHistory,
createWebHistory,
createMemoryHistory,
createRouter,
} from 'vue-router';

export { default as Plugin, ApplyPluginsType } from './plugin';
}
export interface ApplyPluginsType {
compose: 'compose',
event: 'event',
modify: 'modify'
};
3 changes: 2 additions & 1 deletion packages/fes-template-vite/.fes.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export default {
menus: [
{
name: 'index',

icon: '/wine-outline.svg',
match: ['/route/*']
},
Expand Down Expand Up @@ -69,7 +70,7 @@ export default {
]
},
locale: {
legacy: true
legacy: false
},
enums: {
status: [
Expand Down

0 comments on commit 081bddc

Please sign in to comment.