import { Component } from '@angular/core'; import { CmModalService } from '../../../../../../components/cosmos.module'; @Component({ selector: 'cm-modal-doc-6', templateUrl: './modal-doc-6.component.html', }) export class ModalDoc6Component { showConfirm = () => { this.confirmServ.confirm({ title: '您是否确认要删除这项内容', content: '点确认 1 秒后关闭', showConfirmLoading: true, onOk() { return new Promise((resolve) => { setTimeout(resolve, 1000); }); }, onCancel() { } }); }; constructor(private confirmServ: CmModalService) { } }