data.ts 905 Bytes
import { FormSchema as BFormSchema } from '../../../../components/Form';
import { useI18n } from '/@/hooks/web/useI18n';
const { t } = useI18n();
const statusOptions = [
  { label: t('common.enableText'), value: 'ENABLE' },
  { label: t('common.stop'), value: 'STOP' },
];

export const formSchema: BFormSchema[] = [
  {
    field: 'position',
    label: t('archive.position.positionName'),
    component: 'Input',
    colProps: { span: 24 },
    required: true,
    componentProps: {
      maxLength: 20,
    },
  },
  {
    field: 'status',
    component: 'Select',
    label: t('archive.position.status'),
    required: true,
    colProps: { span: 24 },
    componentProps: {
      options: statusOptions,
    },
  },
  {
    field: 'notes',
    label: t('archive.position.remark'),
    component: 'InputTextArea',
    colProps: { span: 24 },
    componentProps: {
      maxLength: 200,
    },
  },
];