Skip to content
This repository has been archived by the owner on Jan 12, 2020. It is now read-only.
This repository has been archived by the owner on Jan 12, 2020. It is now read-only.

在支付宝小程序中使用会出错 #24

Open
chaucerling opened this issue Dec 18, 2018 · 1 comment
Open

在支付宝小程序中使用会出错 #24

chaucerling opened this issue Dec 18, 2018 · 1 comment

Comments

@chaucerling
Copy link

我是用原生的 weappx-weapp 和 weappx,出现问题的代码是在page里直接修改了 state 的值,这段代码在微信小程序是没有报错的。调试后发现,其他的直接修改 state 的代码也是有同样的问题,state 里的value 值调用了Object.freeze,Object.seal 或者是 Object.preventExtensions 把对象设置为不可修改。

app.dispatcher.searchOption.setParams();
let option = this.data.searchOption.params;
option.page = 0;
Cannot assign to read only property 'page' of object '#<Object>'

这是因为这个库本来就不允许外部直接修改 state,还是因为支付宝小程序的原因?

@chaucerling
Copy link
Author

我是用 https://github.com/cantonjs/wxapp-boilerplate 这个手脚架做编译的,直接文件引入到原生的支付宝小程序是没这个问题的

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant