Giter Site home page Giter Site logo

slider-infinite's Introduction

Slider infinite

拷贝example/src/components/目录内的SliderInfiniteSliderPage到自己的组件目录。

Guide

<slider-infinite v-bind:pages="imageList">
    <template slot-scope="props">
    <div>
        <slider-page :page="props.page" :index="props.index" :slider-index="props.sliderIndex">
        <template slot-scope="props">
            <image class="image" resize="cover" :src="props.page.src"></image>
        </template>
        </slider-page>
    </div>
    </template>
</slider-infinite>

slider-page 有一个必要参数。pages,需要绑定的数据,且必须是一个对象数组。

slider-infinite的子组件必须是slider-page,且必须包含三个属性。

page是pages内的每一项数据。

index是slider-page的索引编号。slider-index是slider-infinite的当前索引。SliderPage中根据这两个数据计算是否需要渲染,达到懒加载的目的。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.