Skip to content

Commit

Permalink
fix: router push not trigger app refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoushaw committed Aug 14, 2021
1 parent 1f3bcfa commit fa71005
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions dev/vue/src/components/microApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default {
async loadApp () {
// console.log(GarfishInstance);
let app = await GarfishInstance.loadApp('vueApp',{
entry: 'http://localhost:8000',
entry: 'http://localhost:2555',
basename: this.basename,
domGetter: ()=> this.$refs.vueApp,
props: {
Expand All @@ -49,7 +49,6 @@ export default {
}
},
mounted () {
console.log(this.basename)
if (hasInit) return;
hasInit = true;
GarfishInstance.run({
Expand Down
4 changes: 1 addition & 3 deletions packages/runtime/router/src/linkTo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,8 @@ export const linkTo = async ({
// application will refresh when autoRefresh configuration to true
const curState = window.history.state || {};
if (
activeApps.length > 0 &&
eventType !== 'popstate' &&
((needToActive.length === 0 && curState[__GARFISH_ROUTER_UPDATE_FLAG__]) ||
(needToActive.length === 0 && autoRefreshApp))
(curState[__GARFISH_ROUTER_UPDATE_FLAG__] || autoRefreshApp)
) {
callCapturedEventListeners(eventType);
}
Expand Down

0 comments on commit fa71005

Please sign in to comment.