fix: 创建流程取消后 不显示loading

This commit is contained in:
GAOANG
2024-04-28 10:50:10 +08:00
parent 10429dfa9e
commit da8d4b1581
2 changed files with 9 additions and 1 deletions

View File

@ -46,6 +46,7 @@
let _taskId = '';
let _nextNodes = [];
let _callback = null;
let _onCancel = null;
const formState = reactive({
nextNodeName: '',
@ -62,7 +63,7 @@
.join('、');
}
function toggleDialog({ isClose, action, callback, processId, taskId, nextNodes } = {}) {
function toggleDialog({ isClose, action, callback, onCancel, processId, taskId, nextNodes } = {}) {
if (isClose) {
isOpen.value = false;
loading.value = false;
@ -71,6 +72,7 @@
isOpen.value = true;
_action.value = action;
_callback = callback;
_onCancel = onCancel;
_processId = processId;
_taskId = taskId;
_nextNodes = nextNodes;
@ -134,6 +136,9 @@
}
function onClickCancel() {
if (_onCancel && typeof _onCancel === 'function') {
_onCancel();
}
isOpen.value = false;
}