求问,为什么then里用setData没有用?

小程序 文章 2022-02-24 10:00 354 0 全屏看文

AI助手支持GPT4.0

求问,为什么then里用setData没有用?Please, why is it useless to use setData in then?

求问,为什么then里用setData没有用?

promise、then里设置值为什么没有设置上?。。

Why are the values set in promise and then not set?..

回答:

zy:

js异步问题,需要在setData之后在获取this.data.words 

老张:

1、JS异步问题。

小黎:

打印有么

N.:在then的括号里打印that.data.words 有结果,在括号外打印是undefined。

-EOF-

AI助手支持GPT4.0