config.ts 700 Bytes
import { FormSchema } from '/@/components/Form';
import { useI18n } from '/@/hooks/web/useI18n';

const { t } = useI18n(); // 加载国际化

export const formSchema: FormSchema[] = [
  {
    field: 'name',
    label: t('rule.chain.index.name'),
    colProps: { span: 16 },
    component: 'Input',
    required: true,
    componentProps: {
      placeholder: t('rule.chain.index.pleasePlaceholder'),
      max: 120,
    },
  },
  {
    field: 'debugMode',
    label: t('rule.chain.index.debugMode'),
    component: 'Checkbox',
    colProps: { span: 8 },
    componentProps: {},
  },
  {
    field: 'description',
    label: t('rule.chain.index.description'),
    component: 'InputTextArea',
  },
];