Closed thinkingc closed 1 month ago
inputTable组件“获取父级数据”示例配置canAccessSuperData: true时,表格界面上能同步上层数据,但顶层form中没有数据
你是如何使用 amis 的? npm
npm
amis 版本是什么?请先在最新 beta 版本测试问题是否存在 最新依然有问题
粘贴有问题的完整 amis schema 代码:
amis schema
{ "type": "page", "body": { "type": "form", "debug": true, "mode": "horizontal", "api": "https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/mock2/form/saveForm", "body": [ { "type": "input-text", "label": "父级文本框", "name": "super_text", "value": "123" }, { "type": "switch", "label": "父级勾选框", "name": "super_switch", "value": false }, { "type": "input-table", "name": "list", "label": "可获取父级数据", "addable": true, "needConfirm": false, "canAccessSuperData": true, "strictMode": false, "value": [ {} ], "columns": [ { "name": "super_text", "type": "text", "label": "表单项", "quickEdit": { "disabledOn": "this.super_switch" } }, { "name": "super_switch", "type": "status", "quickEdit": false, "label": "非表单项" } ] } ] } }
操作步骤 开启canAccessSuperData,然后点击新增。可以看到第二条input中有“123”,但debug对应的数据是空的。
combo 好像可以
combo之前也有同样问题,这个issue #8773 修过
为什么没用combo的思路去修呢?
描述问题:
inputTable组件“获取父级数据”示例配置canAccessSuperData: true时,表格界面上能同步上层数据,但顶层form中没有数据
截图或视频:
如何复现(请务必完整填写下面内容):
你是如何使用 amis 的?
npm
amis 版本是什么?请先在最新 beta 版本测试问题是否存在 最新依然有问题
粘贴有问题的完整
amis schema
代码:操作步骤 开启canAccessSuperData,然后点击新增。可以看到第二条input中有“123”,但debug对应的数据是空的。