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(module:date-picker): add some inputs #4843

Merged
merged 5 commits into from
Mar 11, 2020

Conversation

wenqi73
Copy link
Member

@wenqi73 wenqi73 commented Mar 6, 2020

Close #2020
Close #1614
Close #4148

  • 新增 [nzDefaultPickerValue]
  • 新增 [nzSeparator]
  • overlay 修改调用方式,减少一层DOM结构

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] 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?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[ ] No

Other information

@zorro-bot
Copy link

zorro-bot bot commented Mar 6, 2020

This preview will be available after the AzureCI is passed.

@codecov
Copy link

codecov bot commented Mar 6, 2020

Codecov Report

Merging #4843 into master will decrease coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4843      +/-   ##
==========================================
- Coverage   92.95%   92.92%   -0.04%     
==========================================
  Files         505      505              
  Lines       12722    12733      +11     
  Branches     1971     1964       -7     
==========================================
+ Hits        11826    11832       +6     
- Misses        472      475       +3     
- Partials      424      426       +2
Impacted Files Coverage Δ
components/date-picker/picker.component.ts 94.11% <100%> (+0.21%) ⬆️
components/date-picker/lib/year-table.component.ts 95.12% <100%> (+0.12%) ⬆️
components/date-picker/lib/abstract-table.ts 90% <100%> (+0.71%) ⬆️
...omponents/date-picker/abstract-picker.component.ts 94.96% <100%> (-0.11%) ⬇️
...mponents/date-picker/date-range-popup.component.ts 91.87% <100%> (+0.08%) ⬆️
components/date-picker/date-picker.service.ts 100% <100%> (ø) ⬆️
components/core/util/text-measure.ts 89.56% <0%> (-1.74%) ⬇️
components/page-header/demo/breadcrumb.ts 100% <0%> (ø) ⬆️
components/page-header/demo/content.ts 100% <0%> (ø) ⬆️
components/cascader/cascader.component.ts 95.39% <0%> (ø) ⬆️
... and 20 more

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 4f7e836...2db903d. Read the comment docs.

@wenqi73 wenqi73 requested a review from wzhudev March 8, 2020 11:21
@@ -207,13 +216,24 @@ export class NzPickerComponent implements AfterViewInit, OnChanges, OnDestroy {
inputWidth +
((this.elementRef.nativeElement as HTMLElement).querySelector('.ant-picker-range-separator') as HTMLElement).offsetWidth;
Copy link
Member

Choose a reason for hiding this comment

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

这里最好用指令去代替 DOM query

@Directive({
  selector: '[nz-picker-range-separator]',
  exportAs: 'nzIcon',
  host: {
    class: 'ant-picker-range-separator'
  }
})
export class NzPockerRangeSeparator {
  constructor(
    public elementRef: ElementRef
  ) {
  }
}

@ViewChlid(NzPockerRangeSeparator) nzPockerRangeSeparator: NzPockerRangeSeparator;

@wenqi73 wenqi73 merged commit af4051e into NG-ZORRO:master Mar 11, 2020
@wenqi73 wenqi73 deleted the date-picker-features branch March 11, 2020 10:18
Ricbet pushed a commit to Ricbet/ng-zorro-antd that referenced this pull request Apr 9, 2020
* feat(module:date-picker): add nzDefaultPickerValue

* feat: add nzSeparator

* fix: reduce dom structure to make host style work
@hsuanxyz hsuanxyz mentioned this pull request Apr 15, 2020
hsuanxyz pushed a commit to hsuanxyz/ng-zorro-antd that referenced this pull request Aug 5, 2020
* feat(module:date-picker): add nzDefaultPickerValue

* feat: add nzSeparator

* fix: reduce dom structure to make host style work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants