Fix workflow action initialization order
This commit is contained in:
parent
34d3c43784
commit
be1d702334
|
|
@ -65,17 +65,6 @@ const tryInit = () => {
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
watch(
|
|
||||||
() => [
|
|
||||||
props.ticket_?.id,
|
|
||||||
props.ticket_?.state,
|
|
||||||
props.ticket_?.participant,
|
|
||||||
props.ticket_?.update_time,
|
|
||||||
props.workflow_key,
|
|
||||||
],
|
|
||||||
tryInit,
|
|
||||||
{ deep: true, immediate: true },
|
|
||||||
);
|
|
||||||
|
|
||||||
const ticketId = ref(null);
|
const ticketId = ref(null);
|
||||||
const actionShow = ref(false);
|
const actionShow = ref(false);
|
||||||
|
|
@ -106,6 +95,20 @@ const init = async () => {
|
||||||
ElMessage.error("缺少workflow_key或ticketId");
|
ElMessage.error("缺少workflow_key或ticketId");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// immediate watcher 注册时会同步执行回调,必须放在 init 初始化之后,
|
||||||
|
// 否则首次进入工艺步骤会在 const init 的暂时性死区内调用它。
|
||||||
|
watch(
|
||||||
|
() => [
|
||||||
|
props.ticket_?.id,
|
||||||
|
props.ticket_?.state,
|
||||||
|
props.ticket_?.participant,
|
||||||
|
props.ticket_?.update_time,
|
||||||
|
props.workflow_key,
|
||||||
|
],
|
||||||
|
tryInit,
|
||||||
|
{ deep: true, immediate: true },
|
||||||
|
);
|
||||||
|
|
||||||
const isSaveing = ref(false);
|
const isSaveing = ref(false);
|
||||||
const isAccepting = ref(false);
|
const isAccepting = ref(false);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue