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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Breadcrumb): when route.children exist, the path of children is wrong #16885

Merged
merged 4 commits into from Jun 3, 2019

Conversation

@haianweifeng
Copy link
Contributor

@haianweifeng haianweifeng commented May 30, 2019

馃 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

馃懟 What's the background?

馃挕 Solution

馃摑 Changelog

Language Changelog
馃嚭馃嚫 English
馃嚚馃嚦 Chinese

鈽戯笍 Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed
<Menu.Item key={child.breadcrumbName || child.path}>
                {itemRender(child, params, routes, [...paths, this.getPath(child.path, params)])}
</Menu.Item>
itemRender(...args) 涓矾寰勫簲璇ュ埌鎷兼帴褰撳墠child.path
getPath() 鍙傛暟璧嬮粯璁ゅ
@afc163
Copy link
Member

@afc163 afc163 commented May 30, 2019

Any reproduce.

@haianweifeng
Copy link
Contributor Author

@haianweifeng haianweifeng commented May 30, 2019

const routes = [
  {
    path: 'first',
    breadcrumbName: 'first:name',
    children: [
      {
          path: '/general',
          breadcrumbName: 'General',
      },
      {
          path: '/layout',
          breadcrumbName: 'Layout',
      },
      {
          path: '/navigation',
          breadcrumbName: 'Navigation',
      }
    ]
  }
];

<Breadcrumb routes={routes} params={{ name: '娴嬭瘯' }} />

鍦ㄨ繖绉嶆儏褰笅娓叉煋鐨

<a href="#/first">General</a>

璺緞搴旇鏄'#/first/general'

瀵逛簬瀛愯矾寰勬槸鍚︿负绌鸿繘琛屽垽鏂
@codecov
Copy link

@codecov codecov bot commented May 30, 2019

Codecov Report

Merging #16885 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16885      +/-   ##
==========================================
+ Coverage   95.96%      96%   +0.04%     
==========================================
  Files         263      263              
  Lines        7329     7337       +8     
  Branches     2048     2050       +2     
==========================================
+ Hits         7033     7044      +11     
+ Misses        294      291       -3     
  Partials        2        2
Impacted Files Coverage 螖
components/breadcrumb/Breadcrumb.tsx 96.61% <100%> (+0.53%) 猬嗭笍
components/_util/wave.tsx 88.67% <0%> (+2.83%) 猬嗭笍

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 abb8692...c6ea0aa. Read the comment docs.

@afc163
Copy link
Member

@afc163 afc163 commented May 30, 2019

Could you create a codesandbox: http://u.ant.design/codesandbox-repro

@ycjcl868
Copy link
Member

@ycjcl868 ycjcl868 commented May 31, 2019

ci broken.

@haianweifeng
Copy link
Contributor Author

@haianweifeng haianweifeng commented May 31, 2019

https://codesandbox.io/embed/antd-reproduction-template-m3qsw
image
褰撴垜鐐瑰嚮first-Layout 鏃 娴忚鍣ㄥ湴鍧娌℃湁鏄剧ず鍒#/index/first/layout

@haianweifeng
Copy link
Contributor Author

@haianweifeng haianweifeng commented Jun 3, 2019

@afc163
Copy link
Member

@afc163 afc163 commented Jun 3, 2019

image

@haianweifeng haianweifeng changed the title Fix breadcrumb fix(Breadcrumb): when route.children exist, the path of children is wrong Jun 3, 2019
haianweifeng
Copy link
Contributor

haianweifeng commented on c6ea0aa Jun 3, 2019

let鏀规垚const

@afc163 afc163 merged commit c2b1384 into ant-design:master Jun 3, 2019
24 of 26 checks passed
24 of 26 checks passed
@packtracker[bot]
packtracker/css Awaiting your base commit report...
Details
@packtracker[bot]
packtracker/javascript Awaiting your base commit report...
Details
CodeFactor No issues found.
Details
@dep[bot]
DEP All dependencies are resolved
@lgtm-com[bot]
LGTM analysis: JavaScript No new or fixed alerts
Details
@semantic-pull-requests[bot]
Semantic Pull Request ready to be squashed
Details
@wip[bot]
WIP Ready for review
Details
ant-design.ant-design #ant design succeeded
Details
@buildsize[bot]
buildsize No significant change
Details
ci/circleci: compile Your tests passed on CircleCI!
Details
ci/circleci: dist Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: setup Your tests passed on CircleCI!
Details
ci/circleci: test_dist Your tests passed on CircleCI!
Details
ci/circleci: test_dist_15 Your tests passed on CircleCI!
Details
ci/circleci: test_dom Your tests passed on CircleCI!
Details
ci/circleci: test_dom_15 Your tests passed on CircleCI!
Details
ci/circleci: test_es Your tests passed on CircleCI!
Details
ci/circleci: test_es_15 Your tests passed on CircleCI!
Details
ci/circleci: test_lib Your tests passed on CircleCI!
Details
ci/circleci: test_lib_15 Your tests passed on CircleCI!
Details
ci/circleci: test_node Your tests passed on CircleCI!
Details
ci/circleci: test_node_15 Your tests passed on CircleCI!
Details
@codecov[bot]
codecov/patch 100% of diff hit (target 95.96%)
Details
@codecov[bot]
codecov/project 96% (+0.04%) compared to abb8692
Details
security/snyk - package.json (paranoidjk) No new issues
Details
@ikobe-zz ikobe-zz mentioned this pull request Jun 6, 2019
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants