Skip to content

Commit

Permalink
Fix: 重复刷新嵌套路由后刷新无效问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Maorey committed Feb 18, 2020
1 parent 7f3bd5e commit 4859405
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vue-tpl",
"author": "毛瑞 <[email protected]>",
"version": "1.2.0",
"version": "1.2.1",
"private": false,
"license": "MIT",
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions src/pages/index/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ function refreshRoute(matched: RouteRecord[], meta: { e: any }) {
}
}

// 没实例(functional) - 刷她爸爸
temp === 0 && (matched as any).parent && refreshRoute([(matched as any).parent], meta)
// 没实例 - 刷她爸爸
!temp && (matched as any).parent && refreshRoute([(matched as any).parent], meta)
return
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/other/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ function refreshRoute(matched: RouteRecord[], meta: { e: any }) {
}
}

// 没实例(functional) - 刷她爸爸
temp === 0 && (matched as any).parent && refreshRoute([(matched as any).parent], meta)
// 没实例 - 刷她爸爸
!temp && (matched as any).parent && refreshRoute([(matched as any).parent], meta)
return
}
}
Expand Down

0 comments on commit 4859405

Please sign in to comment.