baidu/amis

6.4.0 6.4.1 SDK 版本crud2里操作列的dialog弹不出来 6.3.0版本是可以的

Closed this issue · 2 comments

描述问题:

  1. 你是如何使用 amis 的?
    sdk

  2. amis 版本是什么?6.4.0 6.4.1 SDK 版本crud2里操作列的dialog弹不出来 6.3.0版本是可以的

  3. 粘贴有问题的完整 amis schema 代码:

{
	"id": "u:a905bc888694",
	"aside": [{
		"type": "input-tree",
		"label": "树组件",
		"name": "tree",
		"id": "u:578e048d7b91",
		"multiple": false,
		"enableNodePath": false,
		"hideRoot": true,
		"showIcon": true,
		"initiallyOpen": true,
		"source": {
			"url": "/prod-api/design/label_tag/list_tree",
			"method": "get",
			"requestAdaptor": "",
			"adaptor": "",
			"messages": {}
		},
		"onEvent": {
			"change": {
				"weight": 0,
				"actions": [{
					"actionType": "reload",
					"data": {
						"tagId": "${event.data.tree}",
						"tagName": "${event.data.item.label}"
					},
					"componentId": "u:9243cb151c84"
				}],
				"debounce": {
					"wait": 100
				}
			}
		},
		"searchable": true,
		"creatable": true,
		"editable": true,
		"rootCreatable": true,
		"createTip": "添加子节点",
		"rootCreateTip": "添加一级节点",
		"addApi": {
			"url": "/prod-api/design/label_tag/add",
			"method": "post",
			"requestAdaptor": "",
			"adaptor": "",
			"messages": {},
			"dataType": "json",
			"data": {
				"&": "$$"
			}
		},
		"removable": true,
		"removeTip": "移除该节点",
		"deleteApi": {
			"url": "/prod-api/design/label_tag/delete",
			"method": "post",
			"requestAdaptor": "",
			"adaptor": "",
			"messages": {},
			"dataType": "json",
			"data": {
				"&": "$$"
			}
		},
		"editTip": "编辑该节点",
		"editApi": {
			"url": "/prod-api/design/label_tag/update",
			"method": "post",
			"requestAdaptor": "",
			"adaptor": "",
			"messages": {},
			"dataType": "json",
			"data": {
				"&": "$$"
			}
		}
	}],
	"body": [{
		"id": "u:9243cb151c84",
		"type": "crud2",
		"mode": "table2",
		"dsType": "api",
		"syncLocation": true,
		"selectable": true,
		"multiple": true,
		"primaryField": "id",
		"loadType": "pagination",
		"api": {
			"url": "/prod-api/design/amis_view/list",
			"method": "post",
			"requestAdaptor": "",
			"adaptor": "",
			"messages": {},
			"dataType": "json",
			"data": {
				"page": "${page}",
				"size": "${perPage}",
				"nameLike": "${name}",
				"&": "$$"
			}
		},
		"filter": {
			"type": "form",
			"title": "条件查询",
			"mode": "inline",
			"columnCount": 3,
			"clearValueOnHidden": true,
			"behavior": ["SimpleQuery"],
			"body": [{
				"name": "createTime",
				"label": "创建时间",
				"type": "input-text",
				"size": "full",
				"required": false,
				"behavior": "SimpleQuery",
				"id": "u:40007f9991de"
			}, {
				"name": "name",
				"label": "名称",
				"type": "input-text",
				"size": "full",
				"required": false,
				"behavior": "SimpleQuery",
				"id": "u:35a09565f9e0"
			}, {
				"name": "code",
				"label": "编码",
				"type": "input-text",
				"size": "full",
				"required": false,
				"behavior": "SimpleQuery",
				"id": "u:8cfcd3efcf95"
			}],
			"actions": [{
				"type": "reset",
				"label": "重置",
				"id": "u:dce4fdbf3182"
			}, {
				"type": "submit",
				"label": "查询",
				"level": "primary",
				"id": "u:06c18028dc37"
			}],
			"id": "u:62835cc31b27",
			"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": "新增",
					"level": "primary",
					"className": "m-r-xs",
					"behavior": "Insert",
					"onEvent": {
						"click": {
							"actions": [{
								"actionType": "dialog",
								"dialog": {
									"type": "dialog",
									"body": [{
										"id": "u:436c7ab89f9f",
										"type": "form",
										"title": "新增数据",
										"mode": "horizontal",
										"dsType": "api",
										"feat": "Insert",
										"body": [{
											"type": "tree-select",
											"label": "树组件",
											"name": "tree",
											"id": "u:1f33b33eccd3",
											"clearable": false,
											"multiple": false,
											"enableNodePath": false,
											"showIcon": true,
											"initiallyOpen": true,
											"source": {
												"url": "http://10.7.73.95:18888/prod-api/design/label_tag/list_tree",
												"method": "get",
												"requestAdaptor": "",
												"adaptor": "",
												"messages": {},
												"data": {
													"value": "${tagId}"
												}
											},
											"onEvent": {
												"change": {
													"weight": 0,
													"actions": [{
														"componentId": "u:59a9b482f642",
														"ignoreError": false,
														"actionType": "setValue",
														"args": {
															"value": "${event.data.item.label}"
														}
													}, {
														"componentId": "u:dc084b9d5206",
														"ignoreError": false,
														"actionType": "setValue",
														"args": {
															"value": "${event.data.item.value}"
														}
													}]
												}
											}
										}, {
											"name": "tagName",
											"label": "分类名称",
											"type": "input-text",
											"id": "u:59a9b482f642",
											"value": "${tagName}"
										}, {
											"name": "createBy",
											"label": "创建者",
											"type": "input-text",
											"id": "u:f367090b910c"
										}, {
											"name": "createTime",
											"label": "创建时间",
											"type": "input-text",
											"id": "u:8aba3428afb5"
										}, {
											"name": "updateBy",
											"label": "更新人",
											"type": "input-text",
											"id": "u:fca17b1f3882"
										}, {
											"name": "updateTime",
											"label": "更新时间",
											"type": "input-text",
											"id": "u:2826e66f07fb"
										}, {
											"name": "remark",
											"label": "备注",
											"type": "input-text",
											"id": "u:3a6810b1590c"
										}, {
											"name": "tenantId",
											"label": "租户id",
											"type": "input-text",
											"id": "u:9465700bda7c"
										}, {
											"name": "name",
											"label": "名称",
											"type": "input-text",
											"id": "u:8397141fa7d2"
										}, {
											"name": "code",
											"label": "编码",
											"type": "input-text",
											"id": "u:22b8435e615c"
										}, {
											"name": "label",
											"label": "label",
											"type": "input-text",
											"id": "u:74a7d76f2159"
										}, {
											"name": "icon",
											"label": "图标",
											"type": "input-text",
											"id": "u:37333ef93945"
										}, {
											"name": "path",
											"label": "path",
											"type": "input-text",
											"id": "u:ed89acca1245"
										}, {
											"name": "schema",
											"label": "schema",
											"type": "input-text",
											"id": "u:57c962e5fd94"
										}, {
											"name": "tagId",
											"label": "分类Id",
											"type": "input-text",
											"id": "u:dc084b9d5206",
											"readOnly": true,
											"value": "${tagId}",
											"visible": true,
											"hidden": false
										}],
										"resetAfterSubmit": true,
										"actions": [{
											"type": "button",
											"actionType": "cancel",
											"label": "取消"
										}, {
											"type": "button",
											"actionType": "submit",
											"label": "提交",
											"level": "primary"
										}],
										"onEvent": {
											"submitSucc": {
												"actions": [{
													"actionType": "search",
													"groupType": "component",
													"componentId": "u:9243cb151c84"
												}]
											}
										}
									}],
									"title": "新增数据",
									"size": "md",
									"actions": [{
										"type": "button",
										"actionType": "cancel",
										"label": "取消",
										"id": "u:0ac589808d87"
									}, {
										"type": "button",
										"actionType": "submit",
										"label": "提交",
										"level": "primary",
										"id": "u:1affa4ac4888",
										"onEvent": {
											"click": {
												"weight": 0,
												"actions": [{
													"ignoreError": false,
													"outputVar": "responseResult",
													"actionType": "ajax",
													"options": {},
													"api": {
														"url": "/prod-api/design/amis_view/add",
														"method": "post",
														"requestAdaptor": "",
														"adaptor": "",
														"messages": {},
														"dataType": "json",
														"data": {
															"&": "$$"
														}
													}
												}]
											}
										}
									}],
									"id": "u:b0f01d717924",
									"actionType": "dialog"
								}
							}]
						}
					},
					"id": "u:a0df6dabc574"
				}, {
					"type": "button",
					"label": "批量删除",
					"behavior": "BulkDelete",
					"level": "danger",
					"className": "m-r-xs",
					"confirmText": "确认要批量删除数据「${JOIN(ARRAYMAP(selectedItems, item => item.id), ',')}」",
					"disabledOn": "${selectedItems != null && selectedItems.length < 1}",
					"onEvent": {
						"click": {
							"actions": [{
								"actionType": "ajax"
							}, {
								"actionType": "search",
								"groupType": "component",
								"componentId": "u:9243cb151c84"
							}]
						}
					},
					"id": "u:45e1dfab31ab"
				}],
				"wrapperBody": false,
				"style": {
					"flexGrow": 1,
					"flex": "1 1 auto",
					"position": "static",
					"display": "flex",
					"flexDirection": "row",
					"flexWrap": "nowrap",
					"alignItems": "stretch",
					"justifyContent": "flex-start"
				},
				"id": "u:9e7313cdb01a",
				"isFixedHeight": false
			}, {
				"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:418f00559dfd"
			}],
			"id": "u:955c0344f028"
		}],
		"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:4e45d2fd9676"
			}, {
				"type": "container",
				"align": "right",
				"body": [{
					"type": "pagination",
					"behavior": "Pagination",
					"layout": ["total", "perPage", "pager"],
					"perPage": 10,
					"perPageAvailable": [10, 20, 50, 100],
					"align": "right",
					"id": "u:91860e1eec58"
				}],
				"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:2f87d514de62"
			}],
			"id": "u:38d6471f53d9"
		}],
		"columns": [{
			"type": "tpl",
			"title": "名称",
			"name": "name",
			"id": "u:5ce338fde736"
		}, {
			"type": "tpl",
			"title": "编码",
			"name": "code",
			"id": "u:02cdefef5a48"
		}, {
			"type": "tpl",
			"title": "创建者",
			"name": "createBy",
			"id": "u:8da403a10d54"
		}, {
			"type": "tpl",
			"title": "创建时间",
			"name": "createTime",
			"id": "u:a3d174bab550"
		}, {
			"type": "tpl",
			"title": "更新人",
			"name": "updateBy",
			"id": "u:a3517952a1c6"
		}, {
			"type": "tpl",
			"title": "更新时间",
			"name": "updateTime",
			"id": "u:c4a9a860488f"
		}, {
			"type": "tpl",
			"title": "备注",
			"name": "remark",
			"id": "u:908335fb2d2a"
		}, {
			"type": "tpl",
			"title": "租户id",
			"name": "tenantId",
			"id": "u:5531f63d59dc"
		}, {
			"type": "tpl",
			"title": "id",
			"name": "id",
			"id": "u:a882dd360ae8"
		}, {
			"type": "tpl",
			"title": "label",
			"name": "label",
			"id": "u:218c3f48c459"
		}, {
			"type": "tpl",
			"title": "图标",
			"name": "icon",
			"id": "u:d75b86c6510b"
		}, {
			"type": "tpl",
			"title": "path",
			"name": "path",
			"id": "u:1b3290d45397"
		}, {
			"type": "tpl",
			"title": "分类Id",
			"name": "tagId",
			"id": "u:2bf3b6ff9f77"
		}, {
			"type": "tpl",
			"title": "分类名称",
			"name": "tagName",
			"id": "u:626d0ab60217"
		}, {
			"type": "operation",
			"title": "操作",
			"id": "u:1e573c85adda",
			"buttons": [{
				"type": "button",
				"label": "查看",
				"level": "link",
				"behavior": "View",
				"onEvent": {
					"click": {
						"actions": [{
							"actionType": "dialog",
							"dialog": {
								"body": {
									"id": "u:5c6a0545d81d",
									"type": "form",
									"title": "查看数据",
									"mode": "horizontal",
									"dsType": "api",
									"feat": "View",
									"body": [{
										"name": "createBy",
										"label": "创建者",
										"type": "input-text"
									}, {
										"name": "createTime",
										"label": "创建时间",
										"type": "input-text"
									}, {
										"name": "updateBy",
										"label": "更新人",
										"type": "input-text"
									}, {
										"name": "updateTime",
										"label": "更新时间",
										"type": "input-text"
									}, {
										"name": "remark",
										"label": "备注",
										"type": "input-text"
									}, {
										"name": "tenantId",
										"label": "租户id",
										"type": "input-text"
									}, {
										"name": "id",
										"label": "id",
										"type": "input-text"
									}, {
										"name": "name",
										"label": "名称",
										"type": "input-text"
									}, {
										"name": "code",
										"label": "编码",
										"type": "input-text"
									}, {
										"name": "label",
										"label": "label",
										"type": "input-text"
									}, {
										"name": "icon",
										"label": "图标",
										"type": "input-text"
									}, {
										"name": "path",
										"label": "path",
										"type": "input-text"
									}, {
										"name": "schema",
										"label": "schema",
										"type": "input-text"
									}, {
										"name": "tagId",
										"label": "分类Id",
										"type": "input-text"
									}, {
										"name": "tagName",
										"label": "分类名称",
										"type": "input-text"
									}],
									"static": true,
									"actions": [{
										"type": "button",
										"actionType": "cancel",
										"label": "关闭"
									}],
									"onEvent": {
										"submitSucc": {
											"actions": [{
												"actionType": "search",
												"groupType": "component",
												"componentId": "u:9243cb151c84"
											}]
										}
									}
								},
								"title": "查看数据",
								"size": "md",
								"actions": [{
									"type": "button",
									"actionType": "cancel",
									"label": "关闭"
								}],
								"type": "dialog",
								"actionType": "dialog"
							}
						}]
					}
				},
				"id": "u:8c480b61efea"
			}, {
				"type": "button",
				"label": "编辑",
				"level": "link",
				"behavior": "Edit",
				"onEvent": {
					"click": {
						"actions": [{
							"actionType": "dialog",
							"dialog": {
								"type": "dialog",
								"body": [{
									"id": "u:5650de6dbc7f",
									"type": "form",
									"title": "编辑数据",
									"mode": "horizontal",
									"dsType": "api",
									"feat": "Edit",
									"body": [{
										"type": "tree-select",
										"label": "分类",
										"name": "tree",
										"id": "u:1a2a78429a15",
										"clearable": true,
										"multiple": false,
										"enableNodePath": false,
										"showIcon": true,
										"initiallyOpen": true,
										"source": {
											"url": "http://10.7.73.95:18888/prod-api/design/label_tag/list_tree",
											"method": "get",
											"requestAdaptor": "",
											"adaptor": "",
											"messages": {},
											"dataType": "json"
										},
										"onEvent": {
											"change": {
												"weight": 0,
												"actions": [{
													"componentId": "u:04671ff6e9b1",
													"ignoreError": false,
													"actionType": "setValue",
													"args": {
														"value": "${event.data.item.value}"
													}
												}, {
													"componentId": "u:9347c42eb92a",
													"ignoreError": false,
													"actionType": "setValue",
													"args": {
														"value": "${event.data.item.label}"
													}
												}]
											}
										},
										"onlyLeaf": false
									}, {
										"name": "createBy",
										"label": "创建者",
										"type": "input-text",
										"id": "u:2548566f927e"
									}, {
										"name": "createTime",
										"label": "创建时间",
										"type": "input-text",
										"id": "u:5ff5164a3144"
									}, {
										"name": "updateBy",
										"label": "更新人",
										"type": "input-text",
										"id": "u:7ebaf700924c"
									}, {
										"name": "updateTime",
										"label": "更新时间",
										"type": "input-text",
										"id": "u:3e5cf8ea4402"
									}, {
										"name": "remark",
										"label": "备注",
										"type": "input-text",
										"id": "u:f77ab2dd550a"
									}, {
										"name": "tenantId",
										"label": "租户id",
										"type": "input-text",
										"id": "u:b7526d126944"
									}, {
										"name": "id",
										"label": "id",
										"type": "input-text",
										"id": "u:b63197dc5c53"
									}, {
										"name": "name",
										"label": "名称",
										"type": "input-text",
										"id": "u:ce38d758845f"
									}, {
										"name": "code",
										"label": "编码",
										"type": "input-text",
										"id": "u:d07ef63ab673"
									}, {
										"name": "label",
										"label": "label",
										"type": "input-text",
										"id": "u:8f7eb12162eb"
									}, {
										"name": "icon",
										"label": "图标",
										"type": "input-text",
										"id": "u:8746f8cf546a"
									}, {
										"name": "path",
										"label": "path",
										"type": "input-text",
										"id": "u:11f3e59e4234"
									}, {
										"name": "schema",
										"label": "schema",
										"type": "input-text",
										"id": "u:d864ba026e2f"
									}, {
										"name": "tagId",
										"label": "分类Id",
										"type": "input-text",
										"id": "u:04671ff6e9b1",
										"visible": true,
										"value": "${tagId}"
									}, {
										"name": "tagName",
										"label": "分类名称",
										"type": "input-text",
										"id": "u:9347c42eb92a",
										"visible": true,
										"value": "${tagName}",
										"hidden": false
									}],
									"resetAfterSubmit": true,
									"actions": [{
										"type": "button",
										"actionType": "cancel",
										"label": "取消"
									}, {
										"type": "button",
										"actionType": "submit",
										"label": "提交",
										"level": "primary"
									}],
									"onEvent": {
										"submitSucc": {
											"actions": [{
												"actionType": "search",
												"groupType": "component",
												"componentId": "u:9243cb151c84"
											}]
										}
									}
								}],
								"title": "编辑数据",
								"size": "md",
								"actions": [{
									"type": "button",
									"actionType": "cancel",
									"label": "取消",
									"id": "u:378147579cad"
								}, {
									"type": "button",
									"actionType": "submit",
									"label": "提交",
									"level": "primary",
									"id": "u:b8ab81302dc3",
									"onEvent": {
										"click": {
											"weight": 0,
											"actions": [{
												"ignoreError": false,
												"outputVar": "responseResult",
												"actionType": "ajax",
												"options": {},
												"api": {
													"url": "/prod-api/design/amis_view/update",
													"method": "post",
													"requestAdaptor": "",
													"adaptor": "",
													"messages": {},
													"dataType": "json",
													"data": {
														"&": "$$"
													}
												}
											}]
										}
									}
								}],
								"id": "u:d5a3a542101b",
								"actionType": "dialog"
							}
						}]
					}
				},
				"id": "u:615c2139d839"
			}, {
				"type": "button",
				"label": "删除",
				"behavior": "Delete",
				"className": "m-r-xs text-danger",
				"level": "link",
				"confirmText": "确认要删除数据",
				"onEvent": {
					"click": {
						"actions": [{
							"actionType": "ajax",
							"outputVar": "responseResult",
							"options": {},
							"api": {
								"url": "http://10.7.73.95:18888/prod-api/design/amis_view/delete",
								"method": "post",
								"requestAdaptor": "",
								"adaptor": "",
								"messages": {},
								"data": {
									"&": "$$"
								}
							}
						}, {
							"actionType": "search",
							"groupType": "component",
							"componentId": "u:9243cb151c84"
						}]
					}
				},
				"id": "u:1db22ce8d96b"
			}, {
				"label": "页面设计",
				"level": "link",
				"id": "u:11d8ef6c9faf",
				"onEvent": {
					"click": {
						"weight": 0,
						"actions": [{
							"ignoreError": false,
							"actionType": "url",
							"args": {
								"url": "http://10.7.73.95:18888/design-web/index.html#/edit/${id}"
							}
						}]
					}
				}
			}]
		}],
		"editorSetting": {
			"mock": {
				"enable": true,
				"maxDisplayRows": 5
			}
		}
	}],
	"asideResizor": true,
	"pullRefresh": {
		"disabled": true
	},
	"regions": ["body", "toolbar", "header", "aside"],
	"asideMinWidth": 300,
	"asideMaxWidth": 400,
	"asideSticky": false,
	"definitions": {}
}
  1. 操作步骤
    请简单描述一下复现的操作步骤...

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

#10189 已修复,待发布版本