import React from 'react';
import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal } from 'antd';
import { FormattedMessage } from 'umi-plugin-react/locale';
import styles from '../style/GoodsList.less';
import router from 'umi/router';
const { Option } = Select;
// 提交事件
function handleSubmit(e, props) {
e.preventDefault();
props.form.validateFields((err, values) => {
if (!err) {
console.log('提交数据: ', values)
}
});
}
// Change 事件
function handleSelectChange(props) {
console.log(props)
}
// 分页
function onChange(pageNumber) {
console.log('Page: ', pageNumber);
}
// 跳转到编辑商品
function toEditGoods() {
router.push({
pathname: '/activity/editActivity',
query: {
a: 'b',
},
});
}
/**
*
*
* @param {*} props
* @returns
*/
const dataSource = [
{
key: '1',
img: 'http://img0.imgtn.bdimg.com/it/u=4246326797,2657995307&fm=26&gp=0.jpg',
name: '华为P30 Pro',
},
{
key: '2',
img: '',
name: '大米',
},
];
const columns = [
{
title: '商品图片',
dataIndex: 'img',
key: 'img',
align: 'center',
render: (text, record) => ,
},
{
title: '商品名称',
dataIndex: 'name',
key: 'name',
align: 'center',
},
{
title: '所属积分',
dataIndex: 'integral',
key: 'integral',
align: 'center',
},
{
title: '总数量',
dataIndex: 'total',
key: 'total',
align: 'center',
},
{
title: '已兑换数量',
dataIndex: 'exchanged',
key: 'exchanged',
align: 'center',
},
{
title: '剩余数量',
dataIndex: 'rest',
key: 'rest',
align: 'center',
},
{
title: '状态',
dataIndex: 'state',
key: 'state',
align: 'center',
},
{
title: '操作',
dataIndex: 'handle',
key: 'handle',
align: 'center',
render: () => <>下架