import React from 'react';
import styles from './XTable2.css';
import GridCell, { CellType, Cell, DataType, GCol, GRow } from '@/index';
import { Input, Select, DatePicker } from 'antd';
export default class XTable2 extends React.Component {
constructor(props: any) {
super(props);
}
state = {
cell: new Cell(),
dog: {
name: 'xiaohua',
},
dogFoods: [
{
name: '骨头',
type: '固体',
amount: 50,
address: '湖北',
tel: '1507133561',
desc: '美味狗骨头',
bak: '每天1根,不能过量',
},
{
name: '鸡肉',
type: '固体',
amount: 510,
address: '湖北',
tel: '1507133561',
desc: '美味鸡肉',
bak: '每天1斤,美滋滋',
},
{
name: '鸭头',
type: '固体',
amount: 510,
address: '湖北',
tel: '1507133561',
desc: '美味鸭肉',
bak: '每天0.5斤,美滋滋',
},
],
foodsAmout: 0,
};
componentWillMount() {
this.state.cell.type = CellType.Group;
this.state.cell.span = 24;
this.state.cell.child = [];
this.state.cell.child.push({
text: '第一栏',
type: CellType.Group,
span: 24,
child: [
{
text: '姓名',
span: 4,
dataType: DataType.Default,
type: CellType.Text,
className: styles.title,
},
{
text: 'name',
span: 4,
type: CellType.Custom,
render: () => {
return ;
},
},
{
text: '部门',
span: 4,
className: styles.title,
},
{
text: 'department',
type: CellType.Custom,
span: 4,
render: () => {
return ;
},
},
{
text: '制表时间',
className: styles.title,
span: 4,
},
{
text: 'createTime',
type: CellType.Custom,
span: 4,
render: () => {
return