UNPKG

ohayolibs

Version:

Ohayo is a set of essential modules for ohayojp.

34 lines (29 loc) 719 B
import { Component, Input } from '@angular/core'; import { NzDrawerRef } from 'ng-zorro-antd/drawer'; @Component({ selector: `app-demo-dialog-drawer`, template: ` <p style="height: 1000px">参数:{{ record | json }}</p> The end! <div class="drawer-footer"> <button nz-button [nzType]="'default'" (click)="cancel()"> Cancel </button> <button nz-button [nzType]="'primary'" (click)="ok()"> OK </button> </div> `, }) export class DemoDrawerComponent { @Input() record: any; constructor(private ref: NzDrawerRef) {} ok(): void { this.ref.close(`new time: ${+new Date()}`); this.cancel(); } cancel(): void { this.ref.close(); } }