amis icon indicating copy to clipboard operation
amis copied to clipboard

弹框报错:[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component,

Open gillbates opened this issue 5 years ago • 7 comments

描述问题:

用官网的例子做的dialog,一点击就报错。

sdk.js:1202 [mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: 'Reaction[t.render()]' Error: Minified React error #185; visit https://reactjs.org/docs/error-decoder.html?invariant=185 for the full message or use the non-minified dev environment for full errors and additional helpful warnings. at Ig (sdk.js:983) at Object.enqueueForceUpdate (sdk.js:886) at t.F.forceUpdate (sdk.js:675) at e.onInvalidate (sdk.js:2162) at e.runReaction (sdk.js:1202) at nt (sdk.js:1202) at et (sdk.js:1202) at sdk.js:1202 at Mj (sdk.js:993) at et (sdk.js:1202)

截图或视频:

iShot2021-06-23 15 07 52

如何复现(请务必完整填写下面内容):

  1. 你是如何使用 amis 的? sdk 用的最新的 1.2.0 https://github.com/baidu/amis/blob/gh-pages/sdk.tar.gz

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

      let amis = amisRequire('amis/embed');
      // 通过替换下面这个配置来生成不同页面
      let amisJSON = {
        "type": "page",
        "body": [
          {
            "type": "button",
            "actionType": "dialog",
            "label": "新增",
            "icon": "fa fa-plus pull-left",
            "className": "m-b-sm",
            "primary": true,
            "dialog": {
              "title": "新增",
              "body": {
                "type": "form",
                "name": "sample-edit-form",
                "api": "post:https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/sample",
                "body": [
                  {
                    "type": "input-text",
                    "name": "engine",
                    "label": "Engine",
                    "required": true
                  },
                  {
                    "type": "divider"
                  },
                  {
                    "type": "input-text",
                    "name": "browser",
                    "label": "Browser",
                    "required": true
                  },
                  {
                    "type": "divider"
                  },
                  {
                    "type": "input-text",
                    "name": "platform",
                    "label": "Platform(s)",
                    "required": true
                  },
                  {
                    "type": "divider"
                  },
                  {
                    "type": "input-text",
                    "name": "version",
                    "label": "Engine version"
                  },
                  {
                    "type": "divider"
                  },
                  {
                    "type": "input-text",
                    "name": "grade",
                    "label": "CSS grade"
                  }
                ]
              }
            }
          }]
      };
      let amisScoped = amis.embed('#root', amisJSON);
    })();
  1. 操作步骤 打开页面,一点,就报错。然后报16个错误之后,弹窗可以弹出来。。。

iShot2021-06-23 15 07 52

gillbates avatar Jun 23 '21 07:06 gillbates

最新 master 代码有问题,正要修

2betop avatar Jun 23 '21 07:06 2betop

。。。那我能下载哪一个可以用的。。。官网的例子现在全是1.2.x的。。。

gillbates avatar Jun 23 '21 07:06 gillbates

https://github.com/baidu/amis/releases/tag/1.1.7

2betop avatar Jun 23 '21 07:06 2betop

用最新的 release 版本

2betop avatar Jun 23 '21 07:06 2betop

好的,谢谢先。

gillbates avatar Jun 23 '21 07:06 gillbates

@2betop 这个bug还有在修吗

theojia avatar Jul 07 '21 09:07 theojia

这个问题已经 beta 版本修了 预计本周五会发 1.2.1

2betop avatar Jul 07 '21 09:07 2betop