fix: 创建流程取消后 不显示loading
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user