<?php

/* ========================================================================
 * $Id: scroll.php 1544 2020-06-15 16:35:47Z onez $
 * 
 * Email: www@onez.cn
 * QQ: 6200103
 * HomePage: http://www.onez.cn
 * ========================================================================
 * Copyright 2016-2017 佳蓝科技.
 * 
 * ======================================================================== */

!defined('IN_ONEZ') && exit('Access Denied');
# edit
#请求数据
if($MODE=='$post'){
  $id=onez()->gp('id');
  $action=onez()->gp('action');
  if($action=='data'){
  }
  return;
}
?>
<div :id="tmpId" ref="container" class="swiper-container" :class="['swiper-type-'+type,'swiper-status-'+status]">
 <div class="swiper-wrapper" ref="wrapper">
    <template v-if="type=='content'">
      <div class="swiper-slide" ref="slide">
        <div class="block-top" v-if="isRefresh">
          <span v-if="status=='default'">下拉加载更多</span>
          <span v-else-if="status=='canrefresh'">松开刷新</span>
          <span v-else-if="status=='refreshing'">正在刷新</span>
        </div>
        <template v-for="item in items">
          <component v-if="item.type" :data="item.data" :is="item.type"></component>
          <div v-else-if="item.html" v-html="item.html" />
          <div v-else v-html="item" />
        </template>
        
        <div v-html="item.html" v-for="item in items" />
      </div>
    </template>
    <template v-else-if="type=='grid'">
      <div class="swiper-slide" v-for="rows in pages">
        <div class="grid-row" v-for="cols in rows">
          <div class="grid-col" v-for="col in cols">
            <h3>{{col.name}}</h3>
          </div>
        </div>
      </div>
    </template>
    <template v-else-if="type=='slide'">
      <slot />
    </template>
  </div>
  <div class="swiper-pagination" v-if="showPagination"></div>
  <div class="swiper-scrollbar" v-if="showScrollbar"></div>
</div>