import { h } from 'vue';
import { ElAvatar, ElTag } from 'element-plus';

export const columns = [
  {
    type: 'selection',
  },
  {
    label: 'ID',
    prop: 'id',
    fixed: 'left',
    width: 50,
  },
  {
    label: '位置描述',
    prop: 'description',
    minWidth: 250,
    render(record) {
      return record.row.layoutDescription + '>>' + record.row.layoutLocation;
    },
  },
  {
    label: '推荐类型',
    prop: 'typeText',
    minWidth: 100,
  },
  {
    label: '推荐ID',
    prop: 'typeId',
    minWidth: 100,
  },
  // {
  //   label: '推荐图片',
  //   prop: 'image',
  //   render(record) {
  //     return h(ElAvatar, {
  //       size: 48,
  //       src: record.row.image,
  //       shape: 'square',
  //       fit: 'fill',
  //     });
  //   },
  //   width: 120,
  // },
  {
    label: '推荐标题',
    prop: 'typeTitle',
    minWidth: 200,
  },
  {
    label: '排序',
    prop: 'sort',
    minWidth: 100,
  },
  {
    label: '创建人',
    prop: 'createUser',
    minWidth: 100,
  },
  {
    label: '创建时间',
    prop: 'createTime',
    width: 180,
  },
];
