|
@@ -8,10 +8,6 @@
|
|
|
<van-search class='equipment-search' v-model='keyword' placeholder='请输入抽屉编号/控制回路/楼层' @search='onSearch'></van-search>
|
|
|
</div>
|
|
|
<div class='card-container'>
|
|
|
- <!-- <swiper class='swiper' ref='bannerSwiper' :options='swiperOption' v-show='list.length'>
|
|
|
- <swiper-slide v-for='(item,index) in list' :class='{"active":item.active}' :key='`${index}_${item.drawernum}`'>{{item.drawernum}}</swiper-slide>
|
|
|
- <div class='swiper-pagination' slot='pagination'></div>
|
|
|
- </swiper>-->
|
|
|
<!-- 解决input搜索,页面卡顿的情况,将swiper抽离成组件 -->
|
|
|
<MSwiper :list='list' v-if='list.length' @itemClick='itemClick' />
|
|
|
</div>
|
|
@@ -80,33 +76,6 @@ export default {
|
|
|
pageKey: `key_${new Date().getTime()}`,
|
|
|
keyword: '',
|
|
|
noDataFlag: false,
|
|
|
- swiperOption: {
|
|
|
- slidesPerView: 3,
|
|
|
- // slidesPerGroup: 3,
|
|
|
- slidesPerColumn: 5,
|
|
|
- spaceBetween: 10,
|
|
|
- slidesPerColumnFill: 'row',
|
|
|
- pagination: {
|
|
|
- el: '.swiper-pagination',
|
|
|
- clickable: true,
|
|
|
- },
|
|
|
- // on: {
|
|
|
- // click: function (event) {
|
|
|
- // const { realIndex } = this
|
|
|
- // // 这里有坑,需要注意的是:this 指向的是 swpier 实例,而不是当前的 vue, 因此借助 vm,来调用 methods 里的方法
|
|
|
- // console.log(this) // -> Swiper
|
|
|
- // console.log(event.target.innerText)
|
|
|
- // // 当前活动块的索引,与activeIndex不同的是,在loop模式下不会将 复制的块 的数量计算在内。
|
|
|
- // swiperVm.handleTap(event.target.innerText)
|
|
|
- // },
|
|
|
- // },
|
|
|
- // autoplay: {
|
|
|
- // //自动播放
|
|
|
- // delay: 1500,
|
|
|
- // disableOnInteraction: false,
|
|
|
- // },
|
|
|
- // speed: 1500, //播放速度
|
|
|
- },
|
|
|
list: [],
|
|
|
currentInfo: {},
|
|
|
location: '', //路由传递的参数
|