| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- import { BasicColumn, FormSchema } from '/@/components/Table';
- export const columns: BasicColumn[] = [
- ## ----------BEGIN 字段循环遍历----------
- #foreach($field in ${table.fields})
- #if(${field.keyFlag})
- ## 主键
- #if(${field.keyIdentityFlag})
- #end
- ## 普通字段
- #else
- {
- title: '#if("$!field.comment" != "")${field.comment}#else${field.propertyName}#end',
- dataIndex: '${field.propertyName}',
- width: 120,
- },
- #end
- #end
- ## ----------END 字段循环遍历----------
- ];
- export const searchFormSchema: FormSchema[] = [
- ## ----------BEGIN 字段循环遍历----------
- #foreach($field in ${table.fields})
- #if(${field.keyFlag})
- ## 主键
- #if(${field.keyIdentityFlag})
- #end
- ## 普通字段
- #else
- {
- field: '${field.propertyName}',
- label: '#if("$!field.comment" != "")${field.comment}#else${field.propertyName}#end',
- component: 'Input',
- componentProps: {
- placeholder: '请输入#if("$!field.comment" != "")${field.comment}#else${field.propertyName}#end',
- },
- },
- #end
- #end
- ## ----------END 字段循环遍历----------
- ];
- export const dataFormSchema: FormSchema[] = [
- ## ----------BEGIN 字段循环遍历----------
- #foreach($field in ${table.fields})
- #if(${field.keyFlag})
- ## 主键
- #if(${field.keyIdentityFlag})
- #end
- ## 普通字段
- #else
- {
- field: '${field.propertyName}',
- label: '#if("$!field.comment" != "")${field.comment}#else${field.propertyName}#end',
- component: 'Input',
- required: true,
- componentProps: {
- placeholder: '请输入#if("$!field.comment" != "")${field.comment}#else${field.propertyName}#end',
- },
- },
- #end
- #end
- ## ----------END 字段循环遍历----------
- ];
|