签入脚本

This commit is contained in:
小蚂蚁云
2026-10-20 11:37:25 +08:00
commit 7f5e8470af
909 changed files with 4045080 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
import { FormSchema } from '@/components/Form/index';
/**
* [[$.ModuleComment]]查询表单配置
*
* 定义列表页搜索区域的表单项,字段来自 filter_fields,
* 按字段类型自动选择组件:
* - 字符型用 Input;
* - 带选项的字段用 Select;
* - 纯数字字段用 InputNumber;
* - 日期字段用 DatePicker。
*/
export const schemas: FormSchema[] = [
[[- range .FilterFields]]
{
// [[.Label]]
field: '[[.Name]]',
component: '[[if eq .Type "CharField"]]Input[[else if .Choices]]Select[[else if and (eq .Type "IntegerField") (not .Choices)]]InputNumber[[else if eq .Type "DateField"]]DatePicker[[else]]Input[[end]]',
label: '[[.Label]]',
componentProps: {
placeholder: '请输入[[.Label]]',
clearable: true,
[[- if .Choices]]
// 选项列表:值用于查询,标签用于展示
options: [
[[- range .Choices]]
{
label: '[[.Label]]',
value: [[.Value]],
},
[[- end]]
],
[[- end]]
},
},
[[- end]]
];