import { BasicColumn } from '/@/components/Table';
import Image from '/@/views/general/attachment/customComponents/Image.vue';
import { h } from 'vue';

export const columns: BasicColumn[] = [
  {
    title: 'ID',
    align: 'center',
    dataIndex: 'id',
    width: 80,
  },
  {
    title: '预览',
    align: 'center',
    dataIndex: 'imgUrl',
    width: 100,
    customRender: ({ record }) => {
      return h(Image, {
        src: record.imgUrl,
        width: '50px',
      });
    },
  },
  {
    title: '宽度',
    align: 'center',
    dataIndex: 'imagewidth',
    width: 80,
  },
  {
    title: '高度',
    align: 'center',
    dataIndex: 'imageheight',
    width: 80,
  },
  {
    title: 'Mime类型',
    align: 'center',
    dataIndex: 'mimetype',
    width: 100,
  },
  {
    title: '创建日期',
    align: 'center',
    dataIndex: 'createtime',
    width: 160,
  },
];
