<article class="component active" id="swiper">
  <h2 class="component-title">幻灯片</h2>
  <p class="component-description">使用幻灯片组件，你需要在 <code>sm.js</code> 和 <code>sm.css</code> 之后额外引入如下两个文件:</p>


{% highlight html %}
<link rel="stylesheet" href="//g.alicdn.com/msui/sm/{{ site.version }}/css/sm-extend.min.css">
<script type='text/javascript' src='//g.alicdn.com/msui/sm/{{ site.version }}/js/sm-extend.min.js' charset='utf-8'></script>
{% endhighlight %}

  <p>幻灯片会在你页面入口执行<code>$.init()</code>后自动初始化。否则，或者你的幻灯片是页面加载后异步加载的,那么需要手动初始化：<code>$(".swiper-container").swiper(config)</code></p>
  <div class="component-example component-example-fullbleed">
    <header class="bar bar-nav">
      <h1 class="title">幻灯片</h1>
    </header>
    <div class="content">
      <!-- Slider -->
      <div class="swiper-container" data-space-between='10' data-pagination='.swiper-pagination'>
        <div class="swiper-wrapper">
          <div class="swiper-slide"><img src="//gqianniu.alicdn.com/bao/uploaded/i4//tfscom/i1/TB1n3rZHFXXXXX9XFXXXXXXXXXX_!!0-item_pic.jpg_320x320q60.jpg" alt=""></div>
          <div class="swiper-slide"><img src="//gqianniu.alicdn.com/bao/uploaded/i4//tfscom/i4/TB10rkPGVXXXXXGapXXXXXXXXXX_!!0-item_pic.jpg_320x320q60.jpg" alt=""></div>
          <div class="swiper-slide"><img src="//gqianniu.alicdn.com/bao/uploaded/i4//tfscom/i1/TB1kQI3HpXXXXbSXFXXXXXXXXXX_!!0-item_pic.jpg_320x320q60.jpg" alt=""></div>
        </div>
        <div class="swiper-pagination"></div>
      </div>
    </div>
  </div>

{% highlight html %}
<div class="content">
  <!-- Slider -->
  <div class="swiper-container" data-space-between='10'>
    <div class="swiper-wrapper">
      <div class="swiper-slide"><img src="//gqianniu.alicdn.com/bao/uploaded/i4//tfscom/i1/TB1n3rZHFXXXXX9XFXXXXXXXXXX_!!0-item_pic.jpg_320x320q60.jpg" alt=""></div>
      <div class="swiper-slide"><img src="//gqianniu.alicdn.com/bao/uploaded/i4//tfscom/i4/TB10rkPGVXXXXXGapXXXXXXXXXX_!!0-item_pic.jpg_320x320q60.jpg" alt=""></div>
      <div class="swiper-slide"><img src="//gqianniu.alicdn.com/bao/uploaded/i4//tfscom/i1/TB1kQI3HpXXXXbSXFXXXXXXXXXX_!!0-item_pic.jpg_320x320q60.jpg" alt=""></div>
    </div>
    <div class="swiper-pagination"></div>
  </div>
</div>
{% endhighlight %}


<h3>手动初始化幻灯片的详细配置</h3>

{% highlight js %}
$(function() {
  $(".swiper-container").swiper(config);
});
{% endhighlight %}

<p>可以在 <code>.swiper-container</code> 容器上通过 <code>data-xxx</code> 的形式配置，也可以在初始化的时候传入一个JS对象来配置。<br>
可用配置项和暴露的方法请参考这里： <a href="http://www.idangero.us/swiper/api/#.VjtIEK4rLyU" target="_blank">swiper 官方文档</a></p>

<p>额外的，提供一个方法<code>$.reinitSwiper(pageid)</code>.重新更新幻灯片
</article>
