fix: pagetype详情页上传文件后底部活动区域没有同步更新记录

This commit is contained in:
jingrow 2026-05-19 05:03:39 +08:00
parent 018171b9d2
commit a63e476909
2 changed files with 8 additions and 1 deletions

View File

@ -266,6 +266,7 @@
</div>
<!-- Activity Section: Like + Comment + Timeline -->
<ActivitySection
ref="activitySectionRef"
:entity="entity"
:id="id"
:record="record"
@ -376,6 +377,7 @@ const dialog = useDialog()
const permissionStore = usePermissionStore()
const authStore = useAuthStore()
const attachmentSectionRef = ref()
const activitySectionRef = ref()
// 使URL slug
const { pagetypeSlug, entity } = usePageTypeSlug(route)
@ -769,7 +771,8 @@ async function handleAddAttachment() {
//
await loadDetail()
//
activitySectionRef.value?.loadDocinfo()
} catch (error: any) {
message.destroyAll()
message.error(error.message || t('Failed to upload attachment'))
@ -788,6 +791,8 @@ async function handleDeleteAttachment(attachment: any) {
message.success(t('Attachment deleted successfully'))
//
await loadDetail()
//
activitySectionRef.value?.loadDocinfo()
} else {
message.error(result.message || t('Failed to delete attachment'))
}

View File

@ -498,6 +498,8 @@ watch(() => [props.entity, props.id], () => {
}
}, { immediate: true })
defineExpose({ loadDocinfo })
// ===== Email Compose =====
const emailComposeRef = ref<InstanceType<typeof EmailComposeModal> | null>(null)