amis2/docs/renderers/CRUD-Table.md

47 lines
1.0 KiB
Markdown
Raw Normal View History

2019-06-04 20:13:40 +08:00
### Table(CRUD)
2019-05-08 22:55:41 +08:00
2019-05-09 21:50:34 +08:00
在 CRUD 中的 Table 主要增加了 Column 里面的以下配置功能,更多参数,请参考[Table](./Table.md)
2019-05-08 22:55:41 +08:00
- `sortable` 开启后可以根据当前列排序(后端排序)。
```schema:height="800" scope="body"
{
2019-05-10 12:13:30 +08:00
"type": "crud",
2019-05-08 22:55:41 +08:00
"api": "/api/sample",
"syncLocation": false,
"title": null,
"perPageField":"rn",
"defaultParams":{
"rn": 10
},
"columns": [
{
"name": "id",
"label": "ID",
"width": 20,
"sortable": true
},
{
"name": "engine",
"label": "Rendering engine",
"sortable": true,
"toggled": false
},
{
"name": "browser",
"label": "Browser",
"sortable": true
},
{
"name": "platform",
"label": "Platform(s)",
"sortable": true
},
{
"name": "version",
"label": "Engine version"
}
]
}
```