column.js 1.28 KB
import { tableConfig } from '@/utils'
const columns = [{
    ...tableConfig,
    title: "序号",
    dataIndex: "index",
    key: "index",
    fixed: "left",
    width: '60px',
    customRender: (text, record, index) => `${index + 1}`
},
{
    ...tableConfig,
    title: "商品名称",
    dataIndex: "productName",
    key: "productName",
    width: 150,
    scopedSlots: {
        customRender: "productName"
    }
},
{
    ...tableConfig,
    title: "一级分类",
    dataIndex: "firstCategoryName",
    width: 150,
    key: "firstCategoryName"
},
{
    ...tableConfig,
    title: "二级分类",
    key: "secondCategoryName",
    width: 150,
    dataIndex: "secondCategoryName"
},
{
    ...tableConfig,
    title: "所属店铺",
    key: "storeName",
    width: 150,
    dataIndex: "storeName",
},
{
    ...tableConfig,
    title: "审核说明",
    dataIndex: "description",
    width: 200,
    key: "description",
    customRender: (text) => text || '--'
},
{
    ...tableConfig,
    title: "使用链接",
    key: "link",
    width: 200,
    dataIndex: "link",
    customRender: text => text || '--'
},
{
    ...tableConfig,
    title: "操作",
    key: "operation",
    fixed: "right",
    width: '100px',
    scopedSlots: {
        customRender: "action"
    },
}
]
export default columns