import type { VxeGridProps } from '#/adapter/vxe-table';

import { SUB_LIST_GRID_HEIGHT } from '#/views/system/shared/sub-list-grid';

export const noteGridOptions: VxeGridProps = {
  columnConfig: {
    useKey: true,
  },
  rowConfig: {
    useKey: true,
    keyField: 'id',
  },
  columns: [
    {
      field: 'level',
      title: '级别',
      width: 80,
      formatter: () => '备注',
    },
    {
      field: 'name',
      title: '名称',
      minWidth: 160,
      slots: { default: 'name' },
    },
    {
      field: 'volume',
      title: '毫升',
      width: 120,
      slots: { default: 'volume' },
    },
    {
      field: 'created_at',
      title: '创建时间',
      minWidth: 160,
    },
  ],
  height: SUB_LIST_GRID_HEIGHT,
  border: true,
  showOverflow: true,
  pagerConfig: {
    enabled: false,
  },
  toolbarConfig: {
    enabled: false,
  },
};
