vue-awesome-swiper异步数据不显示
时间: 2023-08-17 19:12:40 浏览: 107
回答: 你遇到的问题是在使用vue-awesome-swiper时,异步加载的数据无法显示。根据你提供的代码,可以看出你在mounted生命周期钩子中使用了axios来获取数据,并将数据赋值给了data属性。然而,你没有将获取到的数据传递给swiper组件进行展示。你需要在获取到数据后,将数据赋值给data属性,然后在模板中使用v-for指令来遍历数据并展示图片。具体的做法是在获取到数据后,将数据赋值给data属性,然后在swiper组件的swiper-slide标签中使用v-for指令来遍历data数组,并将每个元素作为图片的src属性值。这样就可以实现异步加载数据并展示的效果。
#### 引用[.reference_title]
- *1* *3* [vue-awesome-swiper中的数据异步加载](https://blog.csdn.net/weixin_30533797/article/details/101165867)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [基于swriper4.的vue-awesome-swiper 插件异步数据加载的loop循环问题](https://blog.csdn.net/weixin_42454941/article/details/81711180)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文
相关推荐
![-](https://img-home.csdnimg.cn/images/20241231044930.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![docx](https://img-home.csdnimg.cn/images/20241231044901.png)
![-](https://img-home.csdnimg.cn/images/20241231044901.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)