fix: 处理赛事操作日志中操作类型与操作来源不转化成中文的问题
This commit is contained in:
@@ -81,12 +81,25 @@ export default defineComponent({
|
||||
const { containerRef, height } = useContainerSize({ headerOffset: 55 });
|
||||
|
||||
/** 渲染 bodyCell */
|
||||
const renderBodyCell = ({ column, text }: { column: any; text: any }) => {
|
||||
const renderBodyCell = ({
|
||||
column,
|
||||
text,
|
||||
record,
|
||||
index,
|
||||
}: {
|
||||
column: any;
|
||||
text: any;
|
||||
record: any;
|
||||
index: number;
|
||||
}) => {
|
||||
if (column.key === 'content') {
|
||||
const raw = text || '';
|
||||
return raw ? <LogContentCell text={raw} /> : <span>-</span>;
|
||||
}
|
||||
// 其他列使用 columns 中的 customRender
|
||||
// 有 customRender 的列使用其渲染函数(如操作类型/操作来源的代码→中文映射)
|
||||
if (column.customRender) {
|
||||
return column.customRender({ text, record, index, column });
|
||||
}
|
||||
return <span>{text || '-'}</span>;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user