fix(缺陷管理): 修复缺陷管理富文本框取消编辑时文本框内容却没有复位的问题

--bug=1036429 --user=宋天阳 【缺陷管理】查看缺陷详情-内容编辑-输入内容后-取消,页面仍回显变更内容 https://www.tapd.cn/55049933/s/1467158
This commit is contained in:
song-tianyang 2024-02-29 17:08:55 +08:00 committed by 刘瑞斌
parent a0ae2b4857
commit 87bfd38188

View File

@ -220,6 +220,8 @@
const fileListRef = ref<InstanceType<typeof MsFileList>>();
//
const contentEditAble = ref(false);
//
const defaultContentValue = ref<string>('');
const currentProjectId = computed(() => appStore.currentProjectId);
// fileList
const fileList = ref<MsFileItem[]>([]);
@ -268,11 +270,14 @@
const { attachments, title, description } = detail;
form.value.title = title;
form.value.description = description;
defaultContentValue.value = description;
handleFileFunc(attachments);
};
//
function handleCancel() {
contentEditAble.value = false;
form.value.description = defaultContentValue.value;
}
//
@ -436,10 +441,11 @@
templateId: props.detailInfo.templateId,
customFields,
};
//
//
const res = await createOrUpdateBug({ request: tmpObj, fileList: fileList.value as unknown as File[] });
if (res) {
Message.success(t('common.updateSuccess'));
defaultContentValue.value = form.value.description;
handleCancel();
emit('updateSuccess');
}