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

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

@chaucerling

Description

@chaucerling

我是用原生的 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,还是因为支付宝小程序的原因?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions