dialog-delete.component.ts 871 B

1234567891011121314151617181920212223242526272829303132
  1. import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
  2. @Component({
  3. selector: 'app-dialog-delete',
  4. templateUrl: './dialog-delete.component.html',
  5. styleUrls: ['./dialog-delete.component.less']
  6. })
  7. export class DialogDeleteComponent implements OnInit {
  8. @Output() hideDelModalEvent = new EventEmitter<any>();
  9. @Output() confirmDelEvent = new EventEmitter<any>();
  10. @Input() btnLoading: boolean = false;
  11. @Input() cancenlLoading: boolean = false;
  12. @Input() delModal: boolean = false;
  13. @Input() content: string = '您确定要删除吗?';
  14. @Input() tips: string = '';
  15. @Input() confirmTxt: string = '确定';
  16. @Input() cancelTxt: string = '取消';
  17. constructor() { }
  18. ngOnInit() {
  19. }
  20. // 隐藏
  21. hideDelModal() {
  22. this.hideDelModalEvent.emit();
  23. }
  24. // 确认删除
  25. confirmDel() {
  26. this.confirmDelEvent.emit();
  27. }
  28. }