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

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

export const childGridOptions: 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: 'code',
      title: '地区编码',
      minWidth: 120,
    },
    {
      field: 'express_fee',
      title: '快递费',
      width: 140,
      slots: { default: 'express_fee' },
    },
  ],
  height: SUB_LIST_GRID_HEIGHT,
  border: true,
  showOverflow: true,
  pagerConfig: {
    enabled: false,
  },
  toolbarConfig: {
    enabled: false,
  },
};
