企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
* cols字段属性列表 1. field:对应返回的数据列 2. title:表格标题 3. align:对齐方式 4. sort:是否排序字段,默认值不显示排序按钮 5. width:表格列宽度 6. minWidth:列最小宽度,设置width后不生效 7. selectList:搜索表单里面的下拉选项 8. tips:开关字段显示的文本,格式:tips:__('Enabled')+'|'+__('Disabled') 9. edit:编辑字段,修改需要再后台接收此字段更新 10. totalRowText:开启汇总属性后的汇总行文本 11. totalRow:是否开启该列的自动合计功能,默认:false 12. fixed:固定列,可选值有:*left*、*right*,该列必须设置在最左(left)、最右(right) 13. search:搜索表单字段的格式:`between:区间搜索、not between:不在区间内、timerage: 时间范围、select:下拉框、range:普通时间范围、time:日期时间,不显示在搜索表单直接设置 **search:false,**` 14. templet:模板解析,见JS 模板 - 模板解析 15. operat:操作选项,模板解析为:templet: Table.templet.operat 时生效 16. searchOp 设置搜索条件 默认`%*%` 17. searchTip 搜索placeholder 18. searchValue 默认搜索值 19. timepickerformat timepicker 搜索表单日期范围格式 默认 `YYYY-MM-DD HH:mm:ss` 20. searchdateformat 搜索表单日期格式 默认 `yyyy-MM-dd HH:mm:ss` 21. dateformat 日期值格式化 默认 `yyyy-MM-dd HH:mm:ss` 格式样板: ~~~ { field: 'id', title: __('ID'), }, { field: 'status', search: 'select', title: __('Status'), filter: 'status', tips: __('enabled') + '|' + __('disabled'), selectList: {0: __('Disabled'), 1: __('Enabled')}, sort: true, templet: Table.templet.switch, width: 100 }, {field:'create_time', title: __('CreateTime'),align: 'center',sort:'sort',width: 170,search: 'timerage',}, { fixed:right, width: 180, align: "center", title: __("Operat"), init: Table.init, templet: Table.templet.operat, operat: ["edit","destroy","delete"] }, ~~~