Skip to content

Commit

Permalink
docs(showcase): optimization docs (#733)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsuanxyz authored and wilsoncook committed Dec 30, 2017
1 parent 383a0f4 commit 29318db
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export class NzDemoLocaleAllComponent implements OnInit {
<a nz-popconfirm>Click to confirm</a>
</nz-popconfirm>
</div>
<nz-calendar [nzFullScreen]="false" style="width: 319px; border: 1px solid #d9d9d9; borderRadius: 4px;"></nz-calendar>
<nz-calendar [nzFullScreen]="false" style="width: 319px; border: 1px solid #d9d9d9; border-radius: 4px;"></nz-calendar>
<div class="example">
<nz-table #nzTable [nzDataSource]="[]">
<thead nz-thead>
Expand Down
22 changes: 11 additions & 11 deletions src/showcase/nz-demo-message/nz-demo-message-loading.component.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import {Component} from '@angular/core';
import {NzMessageService} from '../../../index.showcase';
import { Component } from '@angular/core';
import { NzMessageService } from '../../../index.showcase';

@Component({
selector : 'nz-demo-message-loading',
template : `
<button nz-button [nzType]="'default'" (click)="createBasicMessage()">显示加载中</button>
`,
`,
styles : []
})
export class NzDemoMessageLoadingComponent {
_id;
createBasicMessage = () => {
this._id = this._message.loading('正在执行中', { nzDuration: 0 }).messageId;
setTimeout(_ => {
this._message.remove(this._id);
}, 2500)
};

constructor(private _message: NzMessageService) {
}
}

createBasicMessage(): void {
const id = this._message.loading('正在执行中', {nzDuration: 0}).messageId;
setTimeout(_ => {
this._message.remove(id);
}, 2500);
}
}
7 changes: 5 additions & 2 deletions src/showcase/nz-demo-spin/nz-demo-spin-nested.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ import { Component } from '@angular/core';
<nz-alert [nzType]="'info'" [nzMessage]="'消息提示的文案'" [nzDescription]="'消息提示的辅助性文字介绍消息提示的辅助性文字介绍消息提示的辅助性文字介绍'">
</nz-alert>
</nz-spin>
切换加载状态:
<nz-switch [(ngModel)]="_isSpinning"></nz-switch>`,
<div style="margin-top:8px;">
切换加载状态:
<nz-switch [(ngModel)]="_isSpinning"></nz-switch>
</div>
`,
styles : []
})
export class NzDemoSpinNestedComponent {
Expand Down

0 comments on commit 29318db

Please sign in to comment.