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

View File

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