UNPKG

zhu-jiang-yi-yuan-mobile

Version:

南方医科大学珠江医院移动端

46 lines (44 loc) 1.26 kB
import "antd/es/table/style"; import _Table from "antd/es/table"; import { Const } from '../../utils'; import { NConst } from 'nsn-const'; import React from 'react'; import { Title } from '../title'; import './index.less'; var CLS_PREFIX = "".concat(Const.CLS_PREFIX, "-table"); var Table = function Table(props) { var columns = [{ title: '指标', dataIndex: 'name' }, { title: '今日值', dataIndex: 'jinri', align: 'right', render: function render(text, item) { return item.percent ? "".concat(text, "%") : text; } }, { title: '昨日值', dataIndex: 'zuori', align: 'right', render: function render(text, item) { return item.percent ? "".concat(text, "%") : text; } }]; var title = props.title, dataSource = props.dataSource, className = props.className; return /*#__PURE__*/React.createElement("div", { className: "".concat(CLS_PREFIX, " ").concat(className || NConst.EMPTY) }, /*#__PURE__*/React.createElement(Title, { text: title }), /*#__PURE__*/React.createElement(_Table, Object.assign({}, { columns: columns, dataSource: dataSource }, { size: "small", className: "block-table", pagination: false }))); }; export { Table };