1.先给要打开的模态窗添加ref属性
<Modal v-model="taskFlowModalStatus" ref="refTaskFlowModal" draggable >
2.编写方法,设置层级
handModalDisplayIndex(modalRefVm) {
this.$nextTick(() => {
setTimeout(() => {
modalRefVm.handleClickModal();
}, 0)
})
},
3.在每一个设置模态窗状态为true的地方添加方法:
openTaskFlowModal() {
this.taskFlowModalStatus = true;
this.handModalDisplayIndex(this.$refs.refTaskFlowModal);
},