UNPKG

ng-ytl-zorro-antd

Version:

An enterprise-class UI components based on Ant Design and Angular

35 lines (25 loc) 787 B
import { Component } from '@angular/core'; import { NzMessageService } from '../../../index.showcase'; @Component({ selector: 'nz-demo-popconfirm-kick', template: ` <nz-popconfirm [nzTitle]="'确定要删除这个任务吗?'" [nzCondition]="switchValue" (nzOnConfirm)="confirm()" (nzOnCancel)="cancel()"> <a nz-popconfirm>删除某任务</a> </nz-popconfirm> <br> <br> 点击是否直接执行 <nz-switch [(ngModel)]="switchValue"></nz-switch> ` }) export class NzDemoPopconfirmKickComponent { switchValue = false; cancel = function () { this.message.info('click cancel'); } confirm = () => { this.message.info('click confirm'); } constructor(private message: NzMessageService) { } }