<template>
<div>
<!-- 点击事件触发axios请求getDate -->
<button @click="getDate">获取数据</button>
<!-- 遍历数组 -->
<!-- 这里的ar是随便起的 -->
<!-- 注意要先包裹template 避免重复写v-if="data"来显示请求到的数据-->
<template v-if="data">
<div class="cell" v-for="ar in data.data.season" :key="ar.season_id"
vue的axios应用2
最新推荐文章于 2024-07-04 15:06:45 发布