import React from 'react'; import { Table, Popconfirm, message, Space } from 'antd'; import { useStore } from '../index'; import {ShopVo, banConfigApi, ListResult} from '../api'; import { isNil } from 'lodash'; import moment from 'moment'; interface Props { addedValueType?: number // 附加值类型 } const Column = Table.Column; export default function LargeList({addedValueType} : Props) { const {list, paginationConfig, loading, setLoading, setCurrentData, setShopData} = useStore(); const handleDeleteConfig = (id?:number) => { banConfigApi({id}) .then(res => { message.success(res.result); setLoading(true); }).catch(e => { message.error(e.message); }); }; function handleRenderShop(value: ShopVo[] = []) { if (value.length === 0) { return '--'; } else if (value.length > 2) { return `${value[0].shopName}等${value.length}个门店`; } return value.map(v => v.shopName).join(","); } function handleEdit(value: ListResult = {}) { setCurrentData({visible: true, title: "编辑", data: value}); } return (