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(page: right-control): completed todo item can be hide #4

Merged
merged 3 commits into from
Sep 16, 2018

Conversation

tirelyl
Copy link

@tirelyl tirelyl commented Sep 15, 2018

No description provided.

@tirelyl
Copy link
Author

tirelyl commented Sep 15, 2018

https://tirelyl.github.io/today-ng-steps online demo

名称
<ul nz-menu>
<li nz-menu-item (click)="toggleCompletedHide()">
{{ completedHide ? '显示以完成' : '隐藏已完成' }}
Copy link
Member

Choose a reason for hiding this comment

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

错别字

<nz-dropdown [nzPlacement]="'bottomRight'">
<a nz-dropdown>
排序
更多设置
Copy link
Member

Choose a reason for hiding this comment

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

叫设置就可以了
最好设置 icon

@@ -1,6 +1,6 @@
<nz-list *ngIf="todos.length > 0" [nzDataSource]="todos" [nzRenderItem]="item" [nzItemLayout]="'horizontal'">
<ng-template #item let-item>
<nz-list-item class="todo-item" (click)="click(item._id)" (contextmenu)="contextMenu($event, todoContextRef, item._id)">
<nz-list-item *ngIf="!(item.completedFlag && completedHide)" class="todo-item" (click)="click(item._id)" (contextmenu)="contextMenu($event, todoContextRef, item._id)">
Copy link
Member

@wzhudev wzhudev Sep 15, 2018

Choose a reason for hiding this comment

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

这样的代码把决定该显示什么东西的算法分离到模板当中, 但是更多的算法在组件类里, 分离会造成后续不易维护.

@wzhudev wzhudev merged commit cc11969 into NG-ZORRO:master Sep 16, 2018
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.

None yet

2 participants