fix(im): 修复 IM 管理详情页类型检查失败
- 使用 Table bodyCell 的 text 避免 column.dataIndex 动态索引类型错误
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user