mirror of
https://github.com/YMFE/yapi.git
synced 2025-03-01 14:05:44 +08:00
fix: statisTable
This commit is contained in:
parent
80f4b6ba67
commit
d03dfac41a
@ -1,10 +1,7 @@
|
||||
import React, { Component } from 'react';
|
||||
import React from 'react';
|
||||
import { Table } from 'antd';
|
||||
import PropTypes from 'prop-types'
|
||||
|
||||
|
||||
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: 'Group',
|
||||
@ -28,29 +25,19 @@ const columns = [
|
||||
}
|
||||
];
|
||||
|
||||
class SchemaTable extends Component {
|
||||
|
||||
static propTypes = {
|
||||
dataSource: PropTypes.array
|
||||
}
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
}
|
||||
|
||||
render() {
|
||||
const {dataSource} = this.props;
|
||||
|
||||
// dataSource = _.isArray(dataSource) ? dataSource : []
|
||||
const StatisTable = (props) => {
|
||||
const {dataSource} = props;
|
||||
return (
|
||||
<div className="m-row-table">
|
||||
<h3 className="statis-title">分组数据详情</h3>
|
||||
<Table className="statis-table" pagination={false} dataSource={dataSource} columns={columns} />
|
||||
</div>
|
||||
)
|
||||
|
||||
;
|
||||
}
|
||||
}
|
||||
export default SchemaTable;
|
||||
|
||||
StatisTable.propTypes = {
|
||||
dataSource: PropTypes.array
|
||||
}
|
||||
|
||||
|
||||
export default StatisTable;
|
Loading…
Reference in New Issue
Block a user