fix(缺陷管理): 更新交互和一直转圈bug修复

This commit is contained in:
xinxin.wu 2024-04-16 17:13:20 +08:00 committed by Craftsman
parent f9cef1c518
commit 0023824099
1 changed files with 74 additions and 61 deletions

View File

@ -144,23 +144,23 @@
</div> </div>
</template> </template>
<template #second> <template #second>
<a-spin :loading="rightLoading" class="w-full"> <!-- <a-spin :loading="rightLoading" class="w-full"> -->
<!-- 所属平台一致, 详情展示 --> <!-- 所属平台一致, 详情展示 -->
<div v-if="props.currentPlatform === detailInfo.platform" class="rightWrapper h-full p-[24px]"> <div v-if="props.currentPlatform === detailInfo.platform" class="rightWrapper h-full p-[24px]">
<!-- 自定义字段开始 --> <!-- 自定义字段开始 -->
<div class="inline-block w-full break-words"> <div class="inline-block w-full break-words">
<a-skeleton v-if="loading" class="w-full" :loading="loading" :animation="true"> <a-skeleton v-if="rightLoading" class="w-full" :loading="rightLoading" :animation="true">
<a-space direction="vertical" class="w-[100%]" size="large"> <a-space direction="vertical" class="w-[100%]" size="large">
<a-skeleton-line :rows="14" :line-height="30" :line-spacing="30" /> <a-skeleton-line :rows="14" :line-height="30" :line-spacing="30" />
</a-space> </a-space>
</a-skeleton> </a-skeleton>
<div v-if="!loading" class="mb-4 font-medium"> <div v-if="!rightLoading" class="mb-4 font-medium">
<strong> <strong>
{{ t('bugManagement.detail.basicInfo') }} {{ t('bugManagement.detail.basicInfo') }}
</strong> </strong>
</div> </div>
<MsFormCreate <MsFormCreate
v-if="!loading" v-if="!rightLoading"
ref="formCreateRef" ref="formCreateRef"
v-model:form-item="formItem" v-model:form-item="formItem"
v-model:api="fApi" v-model:api="fApi"
@ -202,7 +202,7 @@
<div v-else> <div v-else>
<a-empty> {{ $t('messageBox.noContent') }} </a-empty> <a-empty> {{ $t('messageBox.noContent') }} </a-empty>
</div> </div>
</a-spin> <!-- </a-spin> -->
</template> </template>
</MsSplitBox> </MsSplitBox>
</div> </div>
@ -562,15 +562,28 @@
}); });
} }
const handelFormCreateChange = debounce(() => { /**
* 单独更新字段
*/
async function updateFieldHandler() {
try {
rightLoading.value = true; rightLoading.value = true;
bugDetailTabRef.value?.handleSave(); await bugDetailTabRef.value?.handleSave();
rightLoading.value = false;
} catch (error) {
console.log(error);
} finally {
rightLoading.value = false;
}
}
const handelFormCreateChange = debounce(() => {
updateFieldHandler();
}, 300); }, 300);
const changeTag = debounce(() => { const changeTag = debounce(() => {
detailInfo.value.tags = tags.value; detailInfo.value.tags = tags.value;
rightLoading.value = true; updateFieldHandler();
bugDetailTabRef.value?.handleSave();
}, 300); }, 300);
// //