Commit bdcf05a4 authored by 郭志伟's avatar 郭志伟

Merge branch 'fix/orderList' into 'master'

fix: 优化代码

See merge request !20
parents 04eae7e5 315f719e
...@@ -67,31 +67,35 @@ const TableList = props => { ...@@ -67,31 +67,35 @@ const TableList = props => {
setLogisticsComList(tempObj); setLogisticsComList(tempObj);
}; };
const renderContent = (record, key) => const renderContent = (record, key) => {
record.mchOrderSkuVoList.map((item, index) => ( if (record.mchOrderSkuVoList) {
<p return record?.mchOrderSkuVoList.map((item, index) => (
className={[ <p
'tableContent', className={[
index < record?.mchOrderSkuVoList?.length - 1 ? 'border' : null, 'tableContent',
].join(' ')} index < record?.mchOrderSkuVoList?.length - 1 ? 'border' : null,
key={item.orderSkuId} ].join(' ')}
> key={item.orderSkuId}
{key === 'skuName' ? <PopoverDom name={item[key]} url={item.imageUrl} /> : ''} >
{key === 'action' && props.type === 2 ? ( {key === 'skuName' ? <PopoverDom name={item[key]} url={item.imageUrl} /> : ''}
<Button {key === 'action' && props.type === 2 ? (
size="small" <Button
type="primary" size="small"
onClick={() => { type="primary"
handleCom(record, item); onClick={() => {
}} handleCom(record, item);
> }}
查看物流 >
</Button> 查看物流
) : ( </Button>
item[key] ) : (
)} item[key]
</p> )}
)); </p>
));
}
return '';
};
const columns = [ const columns = [
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment