* 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"]
},
~~~
- 介紹
- 系統架構
- 安裝
- 多語言
- 數據庫
- 控制器
- 開發示例
- 前端
- js 模板
- js cols字段解析
- 權限驗證
- table事件
- 常用組件
- input表單
- xmselect表單
- textarea表單
- upload表單
- editor表單
- select表單
- radio表單
- switch表單
- checkbox表單
- arrays表單
- icon表單
- date表單
- city表單
- region表單
- tags表單
- color表單
- submit按鈕
- close按鈕
- Api接口
- 插件基礎
- 目錄結構
- 插件市場
- 插件管理
- 插件開發
- 模塊
- 插件文件
- 插件配置
- 插件基礎信息
- 內置函數
- 插件數據庫
- 全局js 文件
- Curd命令行
- CURD命令
- Menu命令
- 表格規范
- CMS管理--待更新
- CMS目錄結構
- 內置標簽
- fun標簽
- 萬能標簽
- 分類標簽
- 導航標簽
- 廣告標簽
- tag標簽
- 友情鏈接
- 碎片標簽
- 常見問題