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

// import dayjs from 'dayjs';

export const formOptions: VbenFormProps = {
  // 默认展开
  collapsed: false,
  schema: [
    // 生成的搜索字段
    {
      fieldName: 'name',
      label: '店铺名称',
      component: 'VbenInput',
    },
    {
      fieldName: 'level',
      label: '店铺等级',
      component: 'InputNumber',
    },
    {
      fieldName: 'phone',
      label: '商家电话号码',
      component: 'VbenInput',
    },
    {
      fieldName: 'person',
      label: '联系人名称',
      component: 'VbenInput',
    },
    {
      fieldName: 'is_featured',
      label: '是否为推荐店铺',
      component: 'VbenSelect',
    },
    {
      fieldName: 'chain',
      label: '是否连锁',
      component: 'VbenSelect',
    },
    {
      fieldName: 'business_suspended',
      label: '是否暂停营业',
      component: 'VbenSelect',
    },
  ],
  // 控制表单是否显示折叠按钮
  showCollapseButton: true,
  submitButtonOptions: {
    content: '查询',
  },
  // 是否在字段值改变时提交表单
  submitOnChange: true,
  // 按下回车时是否提交表单
  submitOnEnter: false,
};
