@aliretail/react-materials-components
Version:
52 lines (45 loc) • 1.64 kB
JavaScript
;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.getTableColumnsList = void 0;
var _ImageText = _interopRequireDefault(require("../../ImageText"));
var getTableColumnsList = function getTableColumnsList(props) {
var columnsConfig = [{
dataIndex: 'item',
title: '商品名称',
width: 300,
cell: function cell(item) {
return /*#__PURE__*/React.createElement(_ImageText["default"], {
size: item === null || item === void 0 ? void 0 : item.size,
iconType: (item === null || item === void 0 ? void 0 : item.iconType) || '',
title: item === null || item === void 0 ? void 0 : item.itemName,
imageUrl: item === null || item === void 0 ? void 0 : item.imageUrl,
subTitle: item === null || item === void 0 ? void 0 : item.skuTitle,
description: item === null || item === void 0 ? void 0 : item.skuCode,
showBalloon: item === null || item === void 0 ? void 0 : item.showBalloon,
balloonContent: item === null || item === void 0 ? void 0 : item.balloonContent
});
}
}, {
dataIndex: 'category',
title: '所属类目',
width: 130
}, {
dataIndex: 'brand',
title: '品牌',
width: 110
}, {
dataIndex: 'shop',
title: '所属店铺',
width: 260
}];
if (props !== null && props !== void 0 && props.showDeliveryStatus) {
columnsConfig.push({
dataIndex: 'deliveryStatusDesc',
title: '物流状态',
width: 260
});
}
return columnsConfig;
};
exports.getTableColumnsList = getTableColumnsList;