import type { VbenFormProps } from '#/adapter/form';

// import dayjs from 'dayjs';

export const formOptions: VbenFormProps = {
  // 默认展开
  collapsed: false,
  schema: [
    // 生成的搜索字段
    {
      fieldName: 'user_id',
      label: '用户',
      component: 'VbenInput',
    },
    {
      fieldName: 'province',
      label: '省',
      component: 'InputNumber',
    },
    {
      fieldName: 'city',
      label: '市',
      component: 'InputNumber',
    },
    {
      fieldName: 'district',
      label: '区',
      component: 'InputNumber',
    },
    {
      fieldName: 'detailed_address',
      label: '详细地址',
      component: 'Textarea',
    },
    {
      fieldName: 'complete_address',
      label: '完整地址',
      component: 'VbenInput',
    },
  ],
  // 控制表单是否显示折叠按钮
  showCollapseButton: true,
  submitButtonOptions: {
    content: '查询',
  },
  // 是否在字段值改变时提交表单
  submitOnChange: true,
  // 按下回车时是否提交表单
  submitOnEnter: false,
};
