import { FormSchema } from '@/components/Form/index'; /** * 查询表单配置 * 定义搜索区域的表单项 */ export const schemas: FormSchema[] = [ {% for field in filter_fields %} { field: '{{ field.name }}', component: '{% if field.type == 'CharField' %}Input{% elif field.choices %}Select{% elif field.type == 'IntegerField' and not field.choices %}InputNumber{% elif field.type == 'DateField' %}DatePicker{% else %}Input{% endif %}', label: '{{ field.label }}', componentProps: { placeholder: '请输入{{ field.label }}', clearable: true, {% if field.choices %} options: [ {% for choice in field.choices %} { label: '{{ choice.label }}', value: {{ choice.value }}, }, {% endfor %} ], {% endif %} }, }, {% endfor %} ];