@bos-alpha/data
Version:
数据管理
38 lines (37 loc) • 1.25 kB
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { Table } from 'antd';
export var BaseClassList = function (_a) {
var dataSource = _a.dataSource;
var columns = [
{
dataIndex: 'className',
title: '对象'
},
{
dataIndex: 'objectName',
title: '对象名称'
},
{
dataIndex: 'classDescription',
title: '对象描述'
}
];
var dataList = dataSource.map(function (item) { return ({
className: item.info.className,
objectName: item.info.type === 'edge'
? item.info.relType
: item.info.objectName,
classDescription: item.info.classDescription
}); });
return (_jsx(Table, { style: { marginTop: 13 }, rowKey: "className", columns: columns, dataSource: dataList, scroll: {
y: 540
}, pagination: {
size: 'small',
showSizeChanger: true,
showQuickJumper: true,
showTotal: function (total, range) {
var page = Math.floor(range[0] / 10) + 1;
return "\u5171".concat(total, "\u6761\uFF0C\u5F53\u524D\u7B2C").concat(page, "\u9875");
}
} }, void 0));
};