// #region
  // methods:{
  //   addO(q){
     
  //     //发送请求前,在搜索中
  //       this.isFirst= false
  //       this.isLoading= true
  //     axios({
  //       url:"https://api.github.com/search/users",
  //       method:'get',
  //       params:{
  //           q
  //       }
  //     }).then((res)=>{
  //      let newArray=  res.data.items.map(item=>({name:item.login, url:item.url, imgUrl: item.avatar_url, id:item.id}))
  //       // console.log(newArray)
  //      this.users = newArray
  //      //发送请求后,更改状态
  //       this.isLoading = false

  //     }).catch((error)=>{
  //       console.log(error.message)
  //       //发送请求有误,更改状态
  //       this.errMsg = error.message
  //       this.isLoading = false
  //     })
  //   }
  // }
//  #endregion

 

相关文章:

  • 2021-04-23
  • 2021-04-17
  • 2021-06-29
  • 2022-02-04
  • 2021-06-13
  • 2021-11-04
  • 2022-12-23
猜你喜欢
  • 2021-06-26
  • 2021-12-15
  • 2022-12-23
  • 2021-07-21
  • 2022-02-21
  • 2022-02-22
相关资源
相似解决方案