zzc-design-mobile icon indicating copy to clipboard operation
zzc-design-mobile copied to clipboard

Toast. hideToast()并没有真的将Toast隐藏

Open xieyihao opened this issue 4 years ago • 0 comments

场景:查接口前显示loading,查完后隐藏loading。

    Toast.loading(lang.ToastText.loading, 0);
    this.getMessageList(pageType)
      .then((data) => {
        Toast.hideToast();
        const { list } = data;
        this.setState({
          pageState: 'normal',
          messageList: list
        });
      })
      .catch((err) => {
        Toast.error(err.message);
        this.setState({
          pageState: 'error',
          messageList: []
        });
      });

截图: image

现在发现在接口太快的时候,Toast.hideToast()并没有真的将Toast隐藏,偶现。 接口返回在30-100ms;

目前,只能延长调用Toast.hideToast()的时间。

xieyihao avatar May 26 '20 08:05 xieyihao