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 => {
setLogisticsComList(tempObj);
};
const renderContent = (record, key) =>
record.mchOrderSkuVoList.map((item, index) => (
<p
className={[
'tableContent',
index < record?.mchOrderSkuVoList?.length - 1 ? 'border' : null,
].join(' ')}
key={item.orderSkuId}
>
{key === 'skuName' ? <PopoverDom name={item[key]} url={item.imageUrl} /> : ''}
{key === 'action' && props.type === 2 ? (
<Button
size="small"
type="primary"
onClick={() => {
handleCom(record, item);
}}
>
查看物流
</Button>
) : (
item[key]
)}
</p>
));
const renderContent = (record, key) => {
if (record.mchOrderSkuVoList) {
return record?.mchOrderSkuVoList.map((item, index) => (
<p
className={[
'tableContent',
index < record?.mchOrderSkuVoList?.length - 1 ? 'border' : null,
].join(' ')}
key={item.orderSkuId}
>
{key === 'skuName' ? <PopoverDom name={item[key]} url={item.imageUrl} /> : ''}
{key === 'action' && props.type === 2 ? (
<Button
size="small"
type="primary"
onClick={() => {
handleCom(record, item);
}}
>
查看物流
</Button>
) : (
item[key]
)}
</p>
));
}
return '';
};
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