-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(module:select): refactor the select to support virutal scroll
- Loading branch information
vthinkxie
committed
Feb 26, 2020
1 parent
05a53e1
commit 40daee9
Showing
56 changed files
with
1,633 additions
and
3,006 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
order: 20 | ||
title: | ||
zh-CN: 大量数据 | ||
en-US: Large amounts of data | ||
--- | ||
|
||
## zh-CN | ||
|
||
组件使用了虚拟滚动技术,可以同时处理大量数据。 | ||
|
||
## en-US | ||
|
||
With the help of virtual scroll, select component can deal with Large amounts of data. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'nz-demo-select-big-data', | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
template: ` | ||
<nz-select nzMode="multiple" nzPlaceHolder="Please select" [(ngModel)]="listOfSelectedValue"> | ||
<nz-option *ngFor="let item of listOfOption" [nzLabel]="item" [nzValue]="item"></nz-option> | ||
</nz-select> | ||
`, | ||
styles: [ | ||
` | ||
nz-select { | ||
width: 100%; | ||
} | ||
` | ||
] | ||
}) | ||
export class NzDemoSelectBigDataComponent implements OnInit { | ||
listOfOption: string[] = []; | ||
listOfSelectedValue = ['a10', 'c12']; | ||
|
||
ngOnInit(): void { | ||
const children: string[] = []; | ||
for (let i = 10; i < 100000; i++) { | ||
children.push(`${i.toString(36)}${i}`); | ||
} | ||
this.listOfOption = children; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
order: 21 | ||
title: | ||
zh-CN: 无边框 | ||
en-US: Bordered-less | ||
--- | ||
|
||
## zh-CN | ||
|
||
无边框样式。 | ||
|
||
## en-US | ||
|
||
Bordered-less style component. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'nz-demo-select-border-less', | ||
template: ` | ||
<nz-select ngModel="lucy" nzBorderless> | ||
<nz-option nzValue="jack" nzLabel="Jack"></nz-option> | ||
<nz-option nzValue="lucy" nzLabel="Lucy"></nz-option> | ||
<nz-option nzValue="disabled" nzLabel="Disabled" nzDisabled></nz-option> | ||
</nz-select> | ||
<nz-select ngModel="lucy" nzDisabled nzBorderless> | ||
<nz-option nzValue="lucy" nzLabel="Lucy"></nz-option> | ||
</nz-select> | ||
`, | ||
styles: [ | ||
` | ||
nz-select { | ||
margin: 0 8px 10px 0; | ||
width: 120px; | ||
} | ||
` | ||
] | ||
}) | ||
export class NzDemoSelectBorderLessComponent {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.