Javascript 如何修理抽屉盖';单击关闭模式时无法打开
form.component.ts form.component.tsJavascript 如何修理抽屉盖';单击关闭模式时无法打开,javascript,angular,typescript,ng-zorro-antd,Javascript,Angular,Typescript,Ng Zorro Antd,form.component.ts form.component.ts @Input()数据?:任意; @Input()抽屉ref:任意; @Input()modalRef:BehaviorSubject; 关闭(){ const modal=this.modalRef.getValue(); this.drawerRef.open(); modal.destroy(); } 我在这里试图做的是当模式打开时,当单击关闭/取消按钮时,它应该隐藏,然后抽屉应该显示。但问题是,当单击关闭/取消按钮时
@Input()数据?:任意;
@Input()抽屉ref:任意;
@Input()modalRef:BehaviorSubject;
关闭(){
const modal=this.modalRef.getValue();
this.drawerRef.open();
modal.destroy();
}
我在这里试图做的是当模式打开时,当单击关闭/取消按钮时,它应该隐藏,然后抽屉应该显示。但问题是,当单击关闭/取消按钮时,它不会出现/显示
openModalRepair(data?: any) {
const MODAL_REF = new BehaviorSubject(null);
const DRAWER_REF = new BehaviorSubject(null);
this.modalRef = this.modal.create({
nzTitle: `For Repair`,
nzMaskClosable: true,
nzClosable: false,
nzContent: FormComponent,
nzComponentParams: {
data: data,
drawerRef: DRAWER_REF,
modalRef: MODAL_REF
},
nzFooter: null
});
this.drawerRef.close();
DRAWER_REF.next(this.drawerRef);
MODAL_REF.next(this.modalRef);
}
@Input() data?: any;
@Input() drawerRef: BehaviorSubject<any>;
@Input() modalRef: BehaviorSubject<any>;
close() {
const modal = this.modalRef.getValue();
const drawer = this.drawerRef.getValue();
drawer.open();
modal.destroy();
}
openModalRepair(data?: any) {
const MODAL_REF = new BehaviorSubject(null);
this.modalRef = this.modal.create({
nzTitle: `For Repair`,
nzMaskClosable: true,
nzClosable: false,
nzContent: FormComponent,
nzComponentParams: {
data: data,
drawerRef: this.drawerRef,
modalRef: MODAL_REF
},
nzFooter: null
});
this.drawerRef.close();
MODAL_REF.next(this.modalRef);
}
@Input() data?: any;
@Input() drawerRef: any;
@Input() modalRef: BehaviorSubject<any>;
close() {
const modal = this.modalRef.getValue();
this.drawerRef.open();
modal.destroy();
}