对象复制请用
var temp = JSON.stringify(obj) newObj = JSON.parse(temp)
切换同步请求如下:
, methods() { otherMethod() { return requestMethod( param ).then(async res => { //TODO 业务 } }, subscribe() { requestMethod( param ).then(async res => { await this.otherMethod() }) } }
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于