Weex踩坑实录

1.新组件无法与配合使用。目前遇到的情况主要是loading没法正常隐藏。

    
        
          
        
        
          Loading ...
          
        
    

方法如下:

methods: {
    loadData(index) {
      modal.toast({
        message: "loadData..." + index,
        duration: 2.0
      });
      stream.fetch(
        {
          method: "GET",
          type: "json",
          url: "http://gank.io/api/data/福利/10/" + index
        },
        res => {
          let data = res.data;
          this.loadinging = false;
          if (!data["error"]) {
            this.results.push(...data["results"]);
          }
        }
      );
    },
    onloadMore() {
      this.index++;
      this.loadinging = true;
      this.loadData(this.index);
    }
  }

在加载成功后,居然就是不隐藏,后来改成就正常了
如下:

    
        
          
        
        
          Loading ...
          
        
    

你可能感兴趣的:(Weex踩坑实录)