6.4.1版本中,设置CRUD2隐藏,Service加载后设置显示时,仅查询、操作和分页区域显示,数据表格区域未显示
Opened this issue · 2 comments
061225 commented
描述问题:
页面添加一个Service和一个CURD2,默认设置CURD2默认不可见,
当Service加载API完成后再设置CURD2可见;
存在问题是查询、操作和分页区域正常显示,但数据表格区域未显示。
截图或视频:
如何复现(请务必完整填写下面内容):
-
你是如何使用 amis 的?
sdk -
amis 版本是什么?请先在最新 beta 版本测试问题是否存在
amis6.4.1存在该问题;
amis6.3.0无该问题。 -
粘贴有问题的完整
amis schema
代码:
{
"type": "crud2",
"id": "u:ac729f2f6390",
"mode": "table2",
"dsType": "api",
"syncLocation": true,
"selectable": true,
"multiple": true,
"primaryField": "id",
"loadType": "pagination",
"filter": {
"type": "form",
"title": "条件查询",
"mode": "inline",
"columnCount": 3,
"clearValueOnHidden": true,
"behavior": [
"SimpleQuery"
],
"body": [
{
"name": "a1",
"label": "a1",
"type": "input-text",
"size": "full",
"required": false,
"behavior": "SimpleQuery",
"id": "u:fba01258f746"
}
],
"actions": [
{
"type": "reset",
"label": "重置",
"id": "u:43c4a8ed2a35"
},
{
"type": "submit",
"label": "查询",
"level": "primary",
"id": "u:bb66faac9e37"
}
],
"id": "u:84ff32c4b7fd",
"feat": "Insert"
},
"headerToolbar": [
{
"type": "flex",
"direction": "row",
"justify": "flex-start",
"alignItems": "stretch",
"style": {
"position": "static"
},
"items": [
{
"type": "container",
"align": "left",
"behavior": [
"Insert",
"BulkEdit",
"BulkDelete"
],
"body": [
{
"type": "button",
"label": "批量删除",
"className": "m-r-xs",
"behavior": "BulkDelete",
"onEvent": {
"click": {
"actions": [
{
"actionType": "ajax"
},
{
"actionType": "search",
"groupType": "component",
"componentId": "u:ac729f2f6390"
}
]
}
},
"id": "u:1f6664a0b545",
"disabledOn": "${selectedItems != null && selectedItems.length < 1}",
"level": "danger",
"confirmText": "确认要批量删除数据「${JOIN(ARRAYMAP(selectedItems, item => item.id), ',')}」"
}
],
"wrapperBody": false,
"style": {
"flexGrow": 1,
"flex": "1 1 auto",
"position": "static",
"display": "flex",
"flexBasis": "auto",
"flexDirection": "row",
"flexWrap": "nowrap",
"alignItems": "stretch",
"justifyContent": "flex-start"
},
"id": "u:8406e2eb7007"
},
{
"type": "container",
"align": "right",
"behavior": [
"FuzzyQuery"
],
"body": [],
"wrapperBody": false,
"style": {
"flexGrow": 1,
"flex": "1 1 auto",
"position": "static",
"display": "flex",
"flexBasis": "auto",
"flexDirection": "row",
"flexWrap": "nowrap",
"alignItems": "stretch",
"justifyContent": "flex-end"
},
"id": "u:a544073dae49"
}
],
"id": "u:b1496b0fe8bf"
}
],
"footerToolbar": [
{
"type": "flex",
"direction": "row",
"justify": "flex-start",
"alignItems": "stretch",
"style": {
"position": "static"
},
"items": [
{
"type": "container",
"align": "left",
"body": [],
"wrapperBody": false,
"style": {
"flexGrow": 1,
"flex": "1 1 auto",
"position": "static",
"display": "flex",
"flexBasis": "auto",
"flexDirection": "row",
"flexWrap": "nowrap",
"alignItems": "stretch",
"justifyContent": "flex-start"
},
"id": "u:68d710eaac6f"
},
{
"type": "container",
"align": "right",
"body": [
{
"type": "pagination",
"behavior": "Pagination",
"layout": [
"total",
"perPage",
"pager"
],
"perPage": 10,
"perPageAvailable": [
10,
20,
50,
100
],
"align": "right",
"id": "u:6dea3565d0b1"
}
],
"wrapperBody": false,
"style": {
"flexGrow": 1,
"flex": "1 1 auto",
"position": "static",
"display": "flex",
"flexBasis": "auto",
"flexDirection": "row",
"flexWrap": "nowrap",
"alignItems": "stretch",
"justifyContent": "flex-end"
},
"id": "u:cad19a38e4f6"
}
],
"id": "u:b9c1922a6072"
}
],
"columns": [
{
"type": "tpl",
"title": "a1",
"name": "a1",
"id": "u:1d151a413004"
},
{
"type": "tpl",
"title": "a2",
"name": "a2",
"id": "u:3ba9393b0c35"
}
],
"editorSetting": {
"mock": {
"enable": true,
"maxDisplayRows": 5
}
},
"visible": false
}
github-actions commented
👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.
Please review the labels and make any necessary changes.
061225 commented
目前调整了逻辑可以规避,但不确定其他地方是否存在类似问题;
调整后的逻辑是,Service加载完成后设置1个页面变量XX,CRUD2的可见参数设置为${XX},即可正常显示。