UNPKG

@51yzone/pc-components

Version:

An enterprise-class UI design language and React-based implementation

64 lines (61 loc) 1.54 kB
import _extends from "@babel/runtime/helpers/extends"; /** * 关键字:日志操作表格 * 新增人:徐友万 * 完善中(暂时不可配置) */ import React from 'react'; import ProTable from '@ant-design/pro-table'; import classnames from 'classnames'; var initColumns = [{ title: '操作类型', dataIndex: 'handleOpName', width: 120 }, { title: '操作人', dataIndex: 'handlerName', width: 100 }, { title: '执行结果', dataIndex: 'handleStatusName', width: 100 }, { title: '操作时间', dataIndex: 'gmtCreatedStr', width: 160 }, { title: '备注说明', dataIndex: 'handleContent', ellipsis: true, width: 200 }]; var LogTable = function LogTable(props) { var columns = props.columns, dataIndexes = props.dataIndexes, rowKey = props.rowKey, request = props.request, prefixCls = props.prefixCls, className = props.className; var newColumns = columns || dataIndexes && initColumns.map(function (n, i) { return _extends(_extends({}, n), { dataIndex: dataIndexes[i] }); }) || initColumns; return /*#__PURE__*/React.createElement("div", { className: classnames(className, "".concat(prefixCls, "-wrapper")) }, /*#__PURE__*/React.createElement(ProTable, { search: false, options: false, columns: newColumns, rowKey: rowKey, pagination: false, bordered: true, size: "small", request: request })); }; LogTable.defaultProps = { prefixCls: 'yz-log-table', className: '' }; export default LogTable;