Skip to content

Commit

Permalink
fix(module:input): fix antd input style change & input password demo (#…
Browse files Browse the repository at this point in the history
…2969)

close #2945 close #2956
  • Loading branch information
vthinkxie authored Feb 26, 2019
1 parent a4ddf9d commit bd03a91
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 6 deletions.
14 changes: 14 additions & 0 deletions components/input/demo/password-input.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
order: 10
title:
zh-CN: 密码框
en-US: Password box
---

## zh-CN

密码框。

## en-US

Input type of password.
24 changes: 24 additions & 0 deletions components/input/demo/password-input.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { Component } from '@angular/core';

@Component({
selector: 'nz-demo-input-password-input',
template: `
<nz-input-group [nzSuffix]="suffixTemplate">
<input [type]="passwordVisible?'text':'password'" nz-input placeholder="input password" [(ngModel)]="password">
</nz-input-group>
<ng-template #suffixTemplate>
<i nz-icon [nzType]="passwordVisible? 'eye-invisible':'eye'" (click)="passwordVisible = !passwordVisible"></i>
</ng-template>
`,
styles : [
`
i {
cursor: pointer;
}
`
]
})
export class NzDemoInputPasswordInputComponent {
passwordVisible = false;
password;
}
4 changes: 2 additions & 2 deletions components/input/demo/search-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ import { Component } from '@angular/core';
</ng-template>
<br>
<br>
<nz-input-group nzSearch [nzSuffix]="suffixIconButton">
<nz-input-group nzSearch [nzAddOnAfter]="suffixIconButton">
<input type="text" nz-input placeholder="input search text">
</nz-input-group>
<ng-template #suffixIconButton>
<button nz-button nzType="primary" nzSearch><i nz-icon type="search"></i></button>
</ng-template>
<br>
<br>
<nz-input-group nzSearch nzSize="large" [nzSuffix]="suffixButton">
<nz-input-group nzSearch nzSize="large" [nzAddOnAfter]="suffixButton">
<input type="text" nz-input placeholder="input search text">
</nz-input-group>
<ng-template #suffixButton>
Expand Down
4 changes: 0 additions & 4 deletions components/input/nz-input-group.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
import { NgClassType } from '../core/types/ng-class';
import { NzSizeLDSType } from '../core/types/size';
import { InputBoolean } from '../core/util/convert';

import { NzInputDirective } from './nz-input.directive';

@Component({
Expand Down Expand Up @@ -123,9 +122,6 @@ export class NzInputGroupComponent implements AfterContentInit {
}
}

constructor() {
}

ngAfterContentInit(): void {
this.updateChildrenInputSize();
}
Expand Down

0 comments on commit bd03a91

Please sign in to comment.