amis/docs/renderers/CRUD-List.md

60 lines
1.3 KiB
Markdown
Raw Normal View History

2019-06-04 20:13:40 +08:00
### List(CRUD)
2019-05-08 22:55:41 +08:00
2019-05-09 21:58:58 +08:00
请参考[List](./List.md)
2019-05-08 22:55:41 +08:00
```schema:height="800" scope="body"
{
2019-05-10 12:13:30 +08:00
"type": "crud",
"api": "/api/mock2/crud/permissions",
2019-05-08 22:55:41 +08:00
"mode": "list",
"placeholder": "当前组内, 还没有配置任何权限.",
"syncLocation": false,
"title": null,
"listItem": {
"title": "$name",
"subTitle": "$description",
"actions": [
{
"icon": "fa fa-edit",
"tooltip": "编辑",
"actionType": "dialog",
"dialog": {
"title": "编辑能力(权限)",
"body": {
"type": "form",
"controls": [
{
"type": "hidden",
"name": "id"
},
{
"name": "name",
"label": "权限名称",
"type": "text",
"disabled": true
},
{
"type": "divider"
},
{
"name": "description",
"label": "描述",
"type": "textarea"
}
]
}
}
},
{
"tooltip": "删除",
"disabledOn": "~[\"admin:permission\", \"admin:user\", \"admin:role\", \"admin:acl\", \"admin:page\", \"page:readAll\", \"admin:settings\"].indexOf(name)",
"icon": "fa fa-times",
"confirmText": "您确定要移除该权限?",
"actionType": "ajax",
"api": "delete:/api/mock2/notFound"
}
]
}
}
```