[Bug] 修改组件报错
zty112233 opened this issue · comments
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I'm using the latest version of DripForm、DripFormTheme.
- I have read the console error message carefully (if applicable).
Description
当fieldKey为'ui:description.type'这种情况,修改组件会报错:Cannot set properties of undefined (setting 'type')
Steps to reproduce
当fieldKey为'ui:description.type'这种情况,修改组件会报错:Cannot set properties of undefined (setting 'type')
Current behavior
当fieldKey为'ui:description.type'这种情况,修改组件会报错:Cannot set properties of undefined (setting 'type')
Expected behavior
当fieldKey为'ui:description.type'这种情况,修改组件会报错:Cannot set properties of undefined (setting 'type')
Your environment
- DripForm version used:
- DripFormTheme used:
- DripFormTheme version used:
Reproducible demo
No response
Self-service
- I'd be willing to fix this bug myself.
麻烦提供可以复现的最小schema和使用的主题
麻烦提供可以复现的最小schema和使用的主题
最小schema:
{
"fieldKey": "ui:description.type",
"title": "是否展示提示",
"ui:type": "radio",
"type": "string",
"ui:options": [
{
"label": "图标",
"value": "icon"
},
{
"label": "文本",
"value": "text"
},
{
"label": "隐藏",
"value": ""
}
],
"default": "icon",
"ui:style": {
"width": "100%"
}
}
主题用的是antd
fieldKey暂时不支持.
,原因如下:
- drip-form内部嵌套错误信息erros展现形式如下:
{
"a.b":"错误信息"
}
- 部分代码根据
.
分割获取当前fieldKey
在后续完善测试覆盖率场景后,可以支持fieldKey携带.
。可以关注后续版本