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

// import dayjs from 'dayjs';

export const formOptions: VbenFormProps = {
  // 默认展开
  collapsed: false,
  schema: [
    // 生成的搜索字段
    {
      fieldName: 'open_id',
      label: '平台OpenId',
      component: 'VbenInput',
    },
    {
      fieldName: 'nick_name',
      label: '用户昵称',
      component: 'VbenInput',
    },
    {
      fieldName: 'phone',
      label: '手机号码',
      component: 'VbenInput',
    },
    {
      fieldName: 'email',
      label: '邮箱',
      component: 'VbenInput',
    },
    {
      fieldName: 'level',
      label: '用户会员等级',
      component: 'InputNumber',
    },
  ],
  // 控制表单是否显示折叠按钮
  showCollapseButton: true,
  submitButtonOptions: {
    content: '查询',
  },
  // 是否在字段值改变时提交表单
  submitOnChange: true,
  // 按下回车时是否提交表单
  submitOnEnter: false,
};
