Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support insert route #698

Merged
merged 6 commits into from
Sep 6, 2021
Merged

feat: support insert route #698

merged 6 commits into from
Sep 6, 2021

Conversation

ttys026
Copy link
Contributor

@ttys026 ttys026 commented Aug 31, 2021

feat: insert route

@ttys026 ttys026 requested a review from kuitos August 31, 2021 17:01
@codecov
Copy link

codecov bot commented Sep 1, 2021

Codecov Report

Merging #698 (ce8f647) into master (5d78b57) will increase coverage by 0.67%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #698      +/-   ##
==========================================
+ Coverage   51.74%   52.42%   +0.67%     
==========================================
  Files          64       64              
  Lines        1546     1568      +22     
  Branches      403      425      +22     
==========================================
+ Hits          800      822      +22     
+ Misses        744      737       -7     
- Partials        2        9       +7     
Impacted Files Coverage Δ
packages/plugin-qiankun/src/common.ts 67.27% <100.00%> (+21.81%) ⬆️
packages/plugin-locale/src/index.ts 82.43% <0.00%> (ø)
packages/plugin-ant-design-pro-block/src/index.ts 0.00% <0.00%> (ø)
packages/plugin-qiankun/src/master/modifyRoutes.ts 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5d78b57...ce8f647. Read the comment docs.

@ttys026 ttys026 changed the title feat: insert route [WIP] feat: insert route Sep 1, 2021
@ttys026 ttys026 changed the title [WIP] feat: insert route feat: support insert route Sep 1, 2021
Copy link
Member

@kuitos kuitos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

路由插入场景还需要做一下前置检查,必须符合这个条件,即 route 自身的 path 必须是 target 对应的 path 的子路由,不然直接 throw error,如

// 这里的 target path 必须是 /user 或者 /,如果是 /abc 这种直接抛异常,因为 /user/test 无法成为 /abc 的子路由
{ path: '/user/test', microApp: 'abc', target: '/user' }

@ttys026 ttys026 requested a review from kuitos September 1, 2021 11:57
@ttys026 ttys026 requested a review from kuitos September 2, 2021 02:39
Copy link
Member

@kuitos kuitos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants