didi / chameleon

🦎 一套代码运行多端,一端所见即多端所见
http://cml.didi.cn/
Apache License 2.0
9.02k stars 693 forks source link

cml 中如果调用mobx.toJS方法转换可观察对象成普通对象 #536

Open weiQing88 opened 3 years ago

weiQing88 commented 3 years ago

代码编译成微信小程序源码后,发现store是mobx。 在action({ state },payload){} 方法通过 state获取到的数组是一个ObservableArray,并不能直接使用。