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

fix(module:page-header): auto title doesn't change when route changed. #293

Closed
wants to merge 3 commits into from
Closed

fix(module:page-header): auto title doesn't change when route changed. #293

wants to merge 3 commits into from

Conversation

taogeT
Copy link
Contributor

@taogeT taogeT commented Nov 23, 2018

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

When parameter: autoTitle is true, the title text doesn't change if router changed.

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@cipchk
Copy link
Member

cipchk commented Nov 23, 2018

抱歉,我完全不理解这个修改的出发点是什么?是否有一个明确的重现示例,以及配对的测试用例呢?

@taogeT
Copy link
Contributor Author

taogeT commented Nov 24, 2018

已经改进了测试用例,测试自动渲染的breadcrumb & title在路由变更时也会及时发生变化。

其实这次和上次的pull request类似,都是解决无参数<page-header></page-header>情况下,当路由变化时自动渲染的元素也要对应路由改变。上次只修正了breadcrumb不变的情况,这次是解决title不变的问题。

添加的property: _titleText,是用来保留[title]的赋值。原来的写法 _title 的值无法区分是由[title] string 得到的还是 [autoTitle] = true 自动赋值的。

cipchk added a commit that referenced this pull request Nov 25, 2018
@cipchk
Copy link
Member

cipchk commented Nov 25, 2018

非常感谢,但是你的逻辑有点让我看得晕晕的,我已经在 #296 一并修复这一现象。

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