无法显示带有数据库数据的轮播数据库中的数据已经找回了,只是不能出现在UI中<b-row> <div class="card-carousel-wrapper"> <div class="card-carousel--nav__left" v-on:click="moveCarousel(-1)" :disable="atHeadOfList"></div> <div class="card-carousel"> <div class="card-carousel--overflow-container"> <div class="card-carousel-cards" :style="{transform:'translateX'+'('+currentOffset+'px'+')'}"> <div class="card-carousel-card" :v-for="field in fieldlist"> <div class="card-carousel--card-header">{{fieldlist.value}}</div> <div class="card-carousel--card" :v-for="schedule in schedulelist"> <div class="btn button" :class="classStatus()" v-on:click="classStatus(3)" :disable="disableButton(2)">{{schedulelist.start_time}}-{{schedulelist.end_time}}</div> </div> </div> </div> </div> </div> <div class="card-carousel--nav__right" v-on:click="moveCarousel(1)" :disable="atEndOfList"></div> </div> </b-row><script> loadSchedule(){ axios({ url: 'bookings/schedule/list/', method:'PUT', data:{ id_field:this.selectedField } }).then(response=>{ this.schedulelist = response.data.serve }).catch(error=>{ console.log(error); }); },</script>loadfield 结果中的数据显示为卡片上的标题,而 loadfield 结果中的数据显示为卡片上的按钮
1 回答
慕的地6264312
TA贡献1817条经验 获得超6个赞
尝试:从v-for指令中删除绑定符号,指令默认绑定到您的属性:
<div class="card-carousel-card" v-for="field in fieldlist">
<div class="card-carousel--card-header">{{fieldlist.value}}</div>
<div class="card-carousel--card" v-for="schedule in schedulelist">
<div class="btn button" :class="classStatus()" v-on:click="classStatus(3)" :disable="disableButton(2)">{{schedulelist.start_time}}-{{schedulelist.end_time}}</div>
</div>
</div>
添加回答
举报
0/150
提交
取消