You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
页面加载时报如下错误,不影响界面操作,第一次加载当前页面没问题,再次加载一直出现
Uncaught (in promise) Error: [mobx-state-tree] You are trying to read or write to an object that is no longer part of a state tree. (Object type: 'ServiceStore', Path upon death: '', Subpath: 'data', Action: ''). Either detach nodes first, or don't use objects after removing / replacing them in the tree.
at fail$1 (mobx-state-tree.module.js:3128:1)
at ObjectNode.assertAlive (mobx-state-tree.module.js:1508:1)
at ObjectNode.unbox (mobx-state-tree.module.js:1580:1)
at ObservableValue.dehanceValue (mobx.module.js:1062:1)
at ObservableValue.get (mobx.module.js:1115:1)
at ObservableObjectAdministration.read (mobx.module.js:4139:1)
at Object.get [as data] (mobx.module.js:4324:1)
at PageRenderer. (Page.js:109:1)
at step (tslib.es6.js:102:1)
at Object.next (tslib.es6.js:83:1)
描述问题:
页面加载时报如下错误,不影响界面操作,第一次加载当前页面没问题,再次加载一直出现
Uncaught (in promise) Error: [mobx-state-tree] You are trying to read or write to an object that is no longer part of a state tree. (Object type: 'ServiceStore', Path upon death: '', Subpath: 'data', Action: ''). Either detach nodes first, or don't use objects after removing / replacing them in the tree.
at fail$1 (mobx-state-tree.module.js:3128:1)
at ObjectNode.assertAlive (mobx-state-tree.module.js:1508:1)
at ObjectNode.unbox (mobx-state-tree.module.js:1580:1)
at ObservableValue.dehanceValue (mobx.module.js:1062:1)
at ObservableValue.get (mobx.module.js:1115:1)
at ObservableObjectAdministration.read (mobx.module.js:4139:1)
at Object.get [as data] (mobx.module.js:4324:1)
at PageRenderer. (Page.js:109:1)
at step (tslib.es6.js:102:1)
at Object.next (tslib.es6.js:83:1)
截图或视频:
如何复现(请务必完整填写下面内容):
npm react组件的形式,代码如下:
import React from 'react';
import 'amis/lib/themes/default.css';
import 'amis/lib/helper.css';
import request from 'src/utils/request'
import '@fortawesome/fontawesome-free/css/all.css';
import '@fortawesome/fontawesome-free/css/v4-shims.css';
import axios from 'axios';
import copy from 'copy-to-clipboard';
import { render as renderAmis, ToastComponent, AlertComponent } from 'amis';
import { toast } from 'amis-ui';
// amis 环境配置
const env = {
// 下面三个接口必须实现
fetcher: ({
url, // 接口地址
method, // 请求方法 get、post、put、delete
data, // 请求数据
responseType,
config, // 其他配置
headers // 请求头
}: any) => {
return request({
url: url,
method: method,
data
})
},
isCancel: (value: any) => (axios as any).isCancel(value),
copy: (content: string) => {
copy(content);
toast.success('内容已复制到粘贴板');
}
};
class AMISComponent extends React.Component<any, any> {
render() {
return renderAmis(
this.props.amisJson,
{
// props...
},
env
);
}
}
export default AMISComponent;
amis 版本是什么?请先在最新 beta 版本测试问题是否存在
amis 2.9.0(2.4.0版本没有问题,后续的版本都有该问题)
粘贴有问题的完整
amis schema
代码:点击同一个左边的菜单,两次后就必然出现(只有第一次不出现)
The text was updated successfully, but these errors were encountered: