diff --git a/components/badge/demo/dot.ts b/components/badge/demo/dot.ts
index 214507e5921..70c994f8123 100644
--- a/components/badge/demo/dot.ts
+++ b/components/badge/demo/dot.ts
@@ -7,7 +7,7 @@ import { Component } from '@angular/core';
Link something
`,
styles : [
- `.anticon-notification {
+ `[nz-icon] {
width: 16px;
height: 16px;
line-height: 16px;
diff --git a/components/dropdown/nz-dropdown.directive.ts b/components/dropdown/nz-dropdown.directive.ts
index 5a77239b52f..bca5bd494ed 100644
--- a/components/dropdown/nz-dropdown.directive.ts
+++ b/components/dropdown/nz-dropdown.directive.ts
@@ -24,6 +24,7 @@ export class NzDropDownDirective implements OnInit {
@HostListener('click', [ '$event' ])
onClick(e: MouseEvent): void {
+ e.stopPropagation();
this.$click.next(e);
}
diff --git a/components/form/demo/advanced-search.ts b/components/form/demo/advanced-search.ts
index f10d088b359..f544cca3bc8 100644
--- a/components/form/demo/advanced-search.ts
+++ b/components/form/demo/advanced-search.ts
@@ -25,7 +25,7 @@ import {
Collapse
-
+
diff --git a/components/form/demo/horizontal-login.ts b/components/form/demo/horizontal-login.ts
index e28b675cb32..0cfd68bbd82 100644
--- a/components/form/demo/horizontal-login.ts
+++ b/components/form/demo/horizontal-login.ts
@@ -11,7 +11,7 @@ import {
`
+
+
+
+`
})
export class NzDemoFormHorizontalLoginComponent implements OnInit {
validateForm: FormGroup;
diff --git a/components/form/demo/normal-login.ts b/components/form/demo/normal-login.ts
index 3865d3c0dbe..ea12cd1af8c 100644
--- a/components/form/demo/normal-login.ts
+++ b/components/form/demo/normal-login.ts
@@ -12,7 +12,7 @@ import {
+
+
`,
styles: [ `
.login-form {
diff --git a/components/form/demo/register.ts b/components/form/demo/register.ts
index 8dceb946314..65946acaae8 100644
--- a/components/form/demo/register.ts
+++ b/components/form/demo/register.ts
@@ -42,9 +42,7 @@ import {
Nickname
-
-
-
+
@@ -104,7 +102,7 @@ import {
`,
styles: [
- `[nz-form] {
+ `[nz-form] {
max-width: 600px;
}`
]
@@ -124,13 +122,13 @@ export class NzDemoFormRegisterComponent implements OnInit {
Promise.resolve().then(() => this.validateForm.controls.checkPassword.updateValueAndValidity());
}
- confirmationValidator = (control: FormControl): { [s: string]: boolean } => {
+ confirmationValidator = (control: FormControl): { [ s: string ]: boolean } => {
if (!control.value) {
return { required: true };
} else if (control.value !== this.validateForm.controls.password.value) {
return { confirm: true, error: true };
}
- }
+ };
getCaptcha(e: MouseEvent): void {
e.preventDefault();
diff --git a/components/icon/demo/basic.ts b/components/icon/demo/basic.ts
index d39e84a80dd..35647bf84f5 100644
--- a/components/icon/demo/basic.ts
+++ b/components/icon/demo/basic.ts
@@ -10,20 +10,14 @@ import { Component } from '@angular/core';
-
-
-
-
-
-
`,
- styles : [ `
- .icons-list > .anticon {
+ styles: [ `
+ [nz-icon] {
margin-right: 6px;
font-size: 24px;
}
- ` ]
+ `]
})
export class NzDemoIconBasicComponent {
}
diff --git a/components/icon/demo/custom.ts b/components/icon/demo/custom.ts
index 69c2565c4ea..38796cf242c 100644
--- a/components/icon/demo/custom.ts
+++ b/components/icon/demo/custom.ts
@@ -24,7 +24,7 @@ import { Component } from '@angular/core';
`,
styles : [ `
- .icons-list > .anticon {
+ [nz-icon] {
margin-right: 6px;
font-size: 24px;
}
diff --git a/components/icon/demo/iconfont.ts b/components/icon/demo/iconfont.ts
index fc831526384..ce810377d46 100644
--- a/components/icon/demo/iconfont.ts
+++ b/components/icon/demo/iconfont.ts
@@ -11,7 +11,7 @@ import { NzIconService } from 'ng-zorro-antd';
`,
styles : [ `
- .icons-list > .anticon {
+ [nz-icon] {
margin-right: 6px;
font-size: 24px;
}
diff --git a/components/input/demo/addon.ts b/components/input/demo/addon.ts
index e764f9501e9..8dae49d0c62 100644
--- a/components/input/demo/addon.ts
+++ b/components/input/demo/addon.ts
@@ -28,9 +28,12 @@ import { Component } from '@angular/core';
-
+
+
+
+
`
})
diff --git a/components/input/demo/presuffix.ts b/components/input/demo/presuffix.ts
index ce744b7d939..76416f1013c 100644
--- a/components/input/demo/presuffix.ts
+++ b/components/input/demo/presuffix.ts
@@ -3,9 +3,10 @@ import { Component } from '@angular/core';
@Component({
selector: 'nz-demo-input-presuffix',
template: `
-
+
+
`,
styles : [
diff --git a/components/input/demo/search-input.ts b/components/input/demo/search-input.ts
index e3ce71e6130..47c434499d9 100644
--- a/components/input/demo/search-input.ts
+++ b/components/input/demo/search-input.ts
@@ -3,9 +3,12 @@ import { Component } from '@angular/core';
@Component({
selector: 'nz-demo-input-search-input',
template: `
-
+
+
+
+
diff --git a/components/input/doc/index.en-US.md b/components/input/doc/index.en-US.md
index 2a9ebb0f8d1..c82c64c715e 100755
--- a/components/input/doc/index.en-US.md
+++ b/components/input/doc/index.en-US.md
@@ -29,12 +29,8 @@ All props of input supported by [w3c standards](https://www.w3schools.com/tags/t
| Property | Description | Type | Default |
| -------- | ----------- | ---- | ------- |
| `[nzAddonAfter]` | The label text displayed after (on the right side of) the input field. | string 丨 `TemplateRef` | |
-| `[nzAddonAfterIcon]` | The label icon's ngClass displayed after. | `string 丨 string[] 丨 Set 丨 { [klass: string]: any; }` | |
| `[nzAddonBefore]` | The label text displayed before (on the left side of) the input field. | string 丨 `TemplateRef` | |
-| `[nzAddonBeforeIcon]` | The label icon's ngClass displayed before. | `string 丨 string[] 丨 Set 丨 { [klass: string]: any; }` | |
| `[nzPrefix]` | The prefix icon for the Input. | string 丨 `TemplateRef` | |
-| `[nzPrefixIcon]` | The prefix icon's ngClass for the Input. | `string 丨 string[] 丨 Set 丨 { [klass: string]: any; }` | |
| `[nzSuffix]` | The suffix icon for the Input. | string 丨 `TemplateRef` | |
-| `[nzSuffixIcon]` | The suffix icon's ngClass for the Input. | `string 丨 string[] 丨 Set 丨 { [klass: string]: any; }` | |
| `[nzCompact]` | Whether use compact style | boolean | false |
| `[nzSize]` | The size of `nz-input-group` specifies the size of the included `nz-input` fields. Available: `large` `default` `small` | string | `default` |
diff --git a/components/input/doc/index.zh-CN.md b/components/input/doc/index.zh-CN.md
index 445998ff84f..4383cccc5c7 100755
--- a/components/input/doc/index.zh-CN.md
+++ b/components/input/doc/index.zh-CN.md
@@ -28,13 +28,9 @@ nz-input 可以使用所有的W3C标准下的所有 [使用方式](https://www.w
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| `[nzAddOnAfter]` | 带标签的 input,设置后置标签 | string 丨 `TemplateRef` | |
-| `[nzAddOnAfterIcon]` | 后置标签按钮,`nzAddOnAfter`的快捷使用方式 | `string 丨 string[] 丨 Set 丨 { [klass: string]: any; }` | - |
| `[nzAddOnBefore]` | 带标签的 input,设置前置标签 | string 丨 `TemplateRef` | |
-| `[nzAddOnBeforeIcon]` | 前置标签按钮,`nzAddOnBefore`的快捷使用方式 | `string 丨 string[] 丨 Set 丨 { [klass: string]: any; }` | - |
| `[nzPrefix]` | 带有前缀图标的 input | string丨 `TemplateRef` | |
-| `[nzPrefixIcon]` | 前缀图标,`nzPrefix`的快捷使用方式 | `string 丨 string[] 丨 Set 丨 { [klass: string]: any; }` | - |
| `[nzSuffix]` | 带有后缀图标的 input | string丨 `TemplateRef` | |
-| `[nzSuffixIcon]` | 后缀图标,`nzSuffix`的快捷使用方式 | `string 丨 string[] 丨 Set 丨 { [klass: string]: any; }` | - |
| `[nzCompact]` | 是否用紧凑模式 | boolean | false |
| `[nzSearch]` | 是否用搜索框 | boolean | false |
| `[nzSize]` | `nz-input-group` 中所有的 `nz-input` 的大小,可选 `large` `default` `small` | string | `default` |
diff --git a/components/layout/demo/custom-trigger.ts b/components/layout/demo/custom-trigger.ts
index a8a9620cb33..6fe2b494cee 100644
--- a/components/layout/demo/custom-trigger.ts
+++ b/components/layout/demo/custom-trigger.ts
@@ -28,7 +28,7 @@ import { Component, TemplateRef, ViewChild } from '@angular/core';
-
+
diff --git a/components/menu/demo/inline-collapsed.ts b/components/menu/demo/inline-collapsed.ts
index 0bdf41f3c6c..3fb531c247a 100644
--- a/components/menu/demo/inline-collapsed.ts
+++ b/components/menu/demo/inline-collapsed.ts
@@ -5,8 +5,7 @@ import { Component } from '@angular/core';
template: `
-
diff --git a/components/package.json b/components/package.json
index 33cc9d0cd9f..0be4c7f4f92 100644
--- a/components/package.json
+++ b/components/package.json
@@ -23,7 +23,7 @@
"dependencies": {
"date-fns": "^1.29.0",
"@angular/cdk": "^6.0.0",
- "@ant-design/icons-angular": "^0.0.3"
+ "@ant-design/icons-angular": "0.0.3"
},
"peerDependencies": {
"@angular/animations": "^6.0.0",
diff --git a/components/popover/nz-popover.component.ts b/components/popover/nz-popover.component.ts
index da34bdc4290..37b9f7e55f3 100644
--- a/components/popover/nz-popover.component.ts
+++ b/components/popover/nz-popover.component.ts
@@ -1,4 +1,5 @@
import {
+ ChangeDetectorRef,
Component,
ContentChild,
TemplateRef
@@ -21,4 +22,7 @@ export class NzPopoverComponent extends NzToolTipComponent {
_prefix = 'ant-popover-placement';
@ContentChild('neverUsedTemplate') _title: string | TemplateRef; // used to remove NzToolTipComponent @ContentChild('nzTemplate')
@ContentChild('nzTemplate') _content: string | TemplateRef;
+ constructor(cdr: ChangeDetectorRef) {
+ super(cdr);
+ }
}
diff --git a/components/select/nz-option-container.component.html b/components/select/nz-option-container.component.html
index f9f7cc3c4d6..4014aae9e24 100644
--- a/components/select/nz-option-container.component.html
+++ b/components/select/nz-option-container.component.html
@@ -20,6 +20,7 @@
-
-
+
{{nzOption.nzLabel}}
+
\ No newline at end of file
diff --git a/components/select/nz-option-li.component.ts b/components/select/nz-option-li.component.ts
index 7d933196c1e..40606d8f1d5 100644
--- a/components/select/nz-option-li.component.ts
+++ b/components/select/nz-option-li.component.ts
@@ -20,6 +20,7 @@ export class NzOptionLiComponent {
active = false;
@Input() nzOption: NzOptionComponent;
@Input() nzShowActive = true;
+ @Input() nzMode = 'default';
// tslint:disable-next-line:no-any
@Input() compareWith: (o1: any, o2: any) => boolean;
diff --git a/components/slider/demo/icon-slider.ts b/components/slider/demo/icon-slider.ts
index 8b6749a4044..040596c6248 100644
--- a/components/slider/demo/icon-slider.ts
+++ b/components/slider/demo/icon-slider.ts
@@ -4,19 +4,19 @@ import { Component, OnInit } from '@angular/core';
selector: 'nz-demo-slider-icon-slider',
template: `
-
+
-
+
`,
styles : [
- `
+ `
.icon-wrapper {
position: relative;
padding: 0px 30px;
}
- .icon-wrapper ::ng-deep .anticon {
+ [nz-icon] {
position: absolute;
top: -2px;
width: 16px;
@@ -26,13 +26,17 @@ import { Component, OnInit } from '@angular/core';
color: rgba(0, 0, 0, .25);
}
- .icon-wrapper ::ng-deep .anticon:first-child {
+ [nz-icon]:first-child {
left: 0;
}
- .icon-wrapper ::ng-deep .anticon:last-child {
+ [nz-icon]:last-child {
right: 0;
}
+
+ .icon-highlight{
+ color: rgba(0, 0, 0, 0.45);
+ }
`
]
})
@@ -41,15 +45,8 @@ export class NzDemoSliderIconSliderComponent implements OnInit {
min = 0;
max = 20;
mid = parseFloat(((this.max - this.min) / 2).toFixed(5));
- preIconClassMap = {
- 'anticon' : true,
- 'anticon-frown-o': true
- };
- nextIconClassMap = {
- 'anticon' : true,
- 'anticon-smile-o': true
- };
-
+ preHighLight = false;
+ nextHighLight = false;
_sliderValue;
set sliderValue(value: number) {
this._sliderValue = value;
@@ -66,8 +63,8 @@ export class NzDemoSliderIconSliderComponent implements OnInit {
highlightIcon() {
const lower = this._sliderValue >= this.mid;
- this.preIconClassMap[ 'anticon-highlight' ] = !lower;
- this.nextIconClassMap[ 'anticon-highlight' ] = lower;
+ this.preHighLight = !lower;
+ this.nextHighLight = lower;
}
}
diff --git a/components/table/demo/default-filter.ts b/components/table/demo/default-filter.ts
index 16fda5f08b9..f37e94423ae 100644
--- a/components/table/demo/default-filter.ts
+++ b/components/table/demo/default-filter.ts
@@ -31,8 +31,8 @@ export class NzDemoTableDefaultFilterComponent {
];
sortName = null;
sortValue = null;
- listOfSearchName = [ 'Joe', 'London' ]; // You need to change it as well!
- searchAddress: string;
+ listOfSearchName = [ 'Joe' ]; // You need to change it as well!
+ searchAddress = 'London';
data = [
{
name: 'John Brown',
diff --git a/components/tabs/demo/editable-card.ts b/components/tabs/demo/editable-card.ts
index d54eda60319..48ce1c1fe40 100644
--- a/components/tabs/demo/editable-card.ts
+++ b/components/tabs/demo/editable-card.ts
@@ -15,7 +15,7 @@ import { Component } from '@angular/core';
-
+
`
})
diff --git a/components/tabs/demo/icon.ts b/components/tabs/demo/icon.ts
index c77a0a8629e..9785969e44e 100644
--- a/components/tabs/demo/icon.ts
+++ b/components/tabs/demo/icon.ts
@@ -6,7 +6,7 @@ import { Component } from '@angular/core';
- {{ tab.name }}
+ {{ tab.name }}
{{ tab.name }}
@@ -17,12 +17,12 @@ export class NzDemoTabsIconComponent {
{
active: true,
name : 'Tab 1',
- icon : 'anticon anticon-apple'
+ icon : 'apple'
},
{
active: false,
name : 'Tab 2',
- icon : 'anticon anticon-android'
+ icon : 'android'
}
];
}
diff --git a/package.json b/package.json
index fa65bae4292..f18c7d9771f 100644
--- a/package.json
+++ b/package.json
@@ -30,11 +30,12 @@
"integration-rollup": "npm run generate && cd integration/rollup && npm run integration",
"postgenerate": "node ./scripts/build/generate-less.js && cp README.md publish/README.md && npm run migration-styles && npm run schematic:generate",
"generate": "ng build ng-zorro-antd-lib",
- "pre-release": "npm run site:init && bash ./scripts/build/replace-publish.sh && npm run generate && node --max_old_space_size=5120 ./node_modules/@angular/cli/bin/ng build --prod && npm run helper"
+ "pre-release": "npm run site:init && bash ./scripts/build/replace-publish.sh && npm run generate && node --max_old_space_size=5120 ./node_modules/@angular/cli/bin/ng build --prod && npm run helper",
+ "netlify": "npm cache clean --force && npm rebuild node-sass && npm run pre-release"
},
"dependencies": {
"@angular/cdk": "^6.0.0",
- "@ant-design/icons-angular": "^0.0.3",
+ "@ant-design/icons-angular": "0.0.3",
"date-fns": "^1.29.0"
},
"devDependencies": {
diff --git a/scripts/site/_site/src/app/share/nz-codebox/nz-codebox.component.ts b/scripts/site/_site/src/app/share/nz-codebox/nz-codebox.component.ts
index e6f57c2ed70..03953446ea2 100644
--- a/scripts/site/_site/src/app/share/nz-codebox/nz-codebox.component.ts
+++ b/scripts/site/_site/src/app/share/nz-codebox/nz-codebox.component.ts
@@ -37,18 +37,11 @@ import { environment } from '../../../environments/environment';
-
-
-
-
-
-
-
-
-
+
+
+
-
diff --git a/tslint.json b/tslint.json
index e1ce0fcfe2f..12856ac6ee0 100644
--- a/tslint.json
+++ b/tslint.json
@@ -20,7 +20,6 @@
"no-output-rename": true,
"no-output-on-prefix": true,
"no-forward-ref": false,
- "no-unused-css": true,
"use-life-cycle-interface": true,
"contextual-life-cycle": true,
"trackBy-function": true,