fix(im): 修复 IM 管理详情页类型检查失败

- 使用 Table bodyCell 的 text 避免 column.dataIndex 动态索引类型错误
pull/369/MERGE
YunaiV 2026-06-20 00:49:06 -07:00
parent 342ea23ca0
commit 9f611f89fc
2 changed files with 5 additions and 5 deletions

View File

@ -112,7 +112,7 @@ defineExpose({ open });
row-key="userId"
size="small"
>
<template #bodyCell="{ column, record }">
<template #bodyCell="{ column, record, text }">
<template v-if="column.dataIndex === 'avatar'">
<Avatar :src="record.avatar" :size="40">
{{ record.nickname?.charAt(0) || '?' }}
@ -143,7 +143,7 @@ defineExpose({ open });
<span v-else>-</span>
</template>
<template v-else>
{{ record[column.dataIndex] || '-' }}
{{ text || '-' }}
</template>
</template>
</Table>

View File

@ -100,7 +100,7 @@ defineExpose({ open });
row-key="id"
size="small"
>
<template #bodyCell="{ column, record }">
<template #bodyCell="{ column, record, text }">
<template v-if="column.dataIndex === 'role'">
<DictTag :type="DICT_TYPE.IM_RTC_PARTICIPANT_ROLE" :value="record.role" />
</template>
@ -108,10 +108,10 @@ defineExpose({ open });
<DictTag :type="DICT_TYPE.IM_RTC_PARTICIPANT_STATUS" :value="record.status" />
</template>
<template v-else-if="['inviteTime', 'acceptTime', 'leaveTime'].includes(column.dataIndex as string)">
{{ formatDateTimeText(record[column.dataIndex]) }}
{{ formatDateTimeText(text) }}
</template>
<template v-else>
{{ record[column.dataIndex] || '-' }}
{{ text || '-' }}
</template>
</template>
</Table>