amis
amis copied to clipboard
自定义重置按钮与toast消息失效
实现场景:
在自己的react项目下安装amis-editor5.1.8(自动安装的是amis2.0.2版)我的react项目是用react-scripts。
存在的问题:
在表单里添加了自定义重置按钮及toast消息,两个都失效
当前方案:
当前还没有解决方案
{
"type": "form",
"id": "u:2c50b683f5ba",
"body": [
{
"type": "reset",
"label": "重置",
"id": "u:f3cc0cba423b"
},
{
"type": "button",
"label": "toast",
"onEvent": {
"click": {
"actions": [
{
"componentId": "",
"args": {
"msgType": "info",
"position": "top-center",
"closeButton": true,
"showIcon": true,
"msg": "测试提示"
},
"actionType": "toast"
}
]
}
},
"id": "u:a38c5e018462"
},
{
"type": "input-text",
"label": "文本",
"name": "text",
"id": "u:88900ec8d8a4"
}
]
}
可以试下5.1.9
@hsm-lv 升级到了5.1.9,BUG还是一样存在
@hsm-lv 升级到了5.1.9,BUG还是一样存在
应该不是amis-editor的bug。我看官网的demo 同样的json是可以弹出来的,官网编辑器地址: https://aisuda.github.io/amis-editor-demo/#/edit/1 我也是 webpack 自己搭建的amis-editor遇到跟你同样问题,我的解决方案: