feat: 先用setTimeout解决

This commit is contained in:
caoqianming 2025-10-20 09:59:48 +08:00
parent 7ed3ee1c33
commit dcd82aba7b
1 changed files with 2 additions and 10 deletions

View File

@ -37,16 +37,8 @@ const workflow = ref(null);
const transitions = ref([]); const transitions = ref([]);
onMounted(async () => { onMounted(async () => {
await getUser() await getUser()
await init() setTimeout(()=>{init()}, 500)
}) })
watch(
() => props.ticket_,
async (newVal) => {
if (newVal && Object.keys(newVal).length > 0) {
await init()
}
}
)
const actionShow = ref(false); const actionShow = ref(false);
const suggestion = ref("") const suggestion = ref("")
const isOwn = ref(false) const isOwn = ref(false)
@ -62,7 +54,7 @@ const init = async () => {
actionShow.value = true; actionShow.value = true;
transitions.value = await API.getTransition(props.ticket_.id); transitions.value = await API.getTransition(props.ticket_.id);
} }
}else if (props.workflow_key !=null && props.workflow_key != undefined) { }else if (props.workflow_key) {
let res = await API.workflowInitkey(props.workflow_key); let res = await API.workflowInitkey(props.workflow_key);
actionShow.value = true actionShow.value = true
transitions.value = res.transitions; transitions.value = res.transitions;