import { h } from 'vue';
import { ElAvatar } from 'element-plus';
import { BasicColumn } from '@/components/Table/index';

export const columns: BasicColumn[] = [
  {
    label: 'id',
    prop: 'id',
  },
  {
    label: '名称',
    prop: 'name',
  },
  {
    label: '头像',
    prop: 'avatar',
    render(record) {
      return h(ElAvatar, {
        size: 48,
        src: record.row.avatar,
        shape: 'square',
        fit: 'fill',
        style: 'width:48px;height:48px',
        class: 'cursor-pointer',
      });
    },
  },
  {
    label: '地址',
    prop: 'address',
  },
];
