npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-pages-toggle

v1.0.0

Published

基于 vue 的页面轮播

Downloads

2

Readme

vue-pages-toggle

基于 vue 的页面轮播

example

use

  1. install vue-pages-toggle

    npm install vue-pages-toggle --save

  2. main.js import

import vuePagesToggle from 'vue-pages-toggle';
Vue.use(vuePagesToggle);
    <pages-toggle :pages-keys-active-style="{'background':'#0f0'}" :swipe-time="3000" animation-duration="2s">
      <pages-toggle-panel>
        <div class="demo demo1">
          <h3>第1屏</h3>
          <p>7年前,上合组织诞生于上海黄浦江畔,欧亚大陆出现一个崭新的区域性多边合作组织。</p>
        </div>
      </pages-toggle-panel>
      <pages-toggle-panel>
        <div class="demo demo2">
          <h3>第2屏</h3>
          <p>从最初的6个成员国发展到现在的8个成员国、4个观察员国、6个对话伙伴,上合组织发展道路越走越宽,务实合作成果越来越多,国际影响越来越大。</p>
        </div>
      </pages-toggle-panel>
      <pages-toggle-panel>
        <div class="demo demo3">
          <h3>第3屏</h3>
          <p>“互信、互利、平等、协商、尊重多样文明、谋求共同发展”,同上合组织相伴而生的“上海精神”如同一座高耸的灯塔,为上合组织持续发展指引方向。</p>
        </div>
      </pages-toggle-panel>
      <pages-toggle-panel>
        <div class="demo demo4">
          <h3>第4屏</h3>
          <p>新时代、新气象、新作为。扩员后再次回到诞生地中国,上合组织青岛峰会更具继往开来的特殊意味,承载着各方的美好期待。</p>
        </div>
      </pages-toggle-panel>
    </pages-toggle>

api

@param {String} position 定位,默认定位上面
@param {Boolean} isPagesKeys 是否显示keys,默认显示
@param {Object, Array} pagesKeysStyle keys样式
@param {Object, Array} pagesKeysActiveStyle keys选中样式
@param {Boolean} isUseKeydown 是否启动键盘事件,默认不启动
@param {Number} swipeTime 轮播时间,默认2000ms
@param {Function} success 轮播成功回调
@param {String} animationDuration 动画完成时间,默认4s,不使用动画设置为0s即可
@param {String} animationTimingFunction 规定动画的速度曲线,默认linear
@param {String} animationDelay 何时开始动画,默认0s
@param {Number} animationIterationCount 设置或返回动画的播放次数,默认1次
@param {String} animationDirection 设置或返回是否循环交替反向播放动画,默认normal
@param {String} animationFillMode 属性规定当动画不播放时(当动画完成时,或当动画有一个延迟未开始播放时),要应用到元素的样式,默认none

warn

设置切换页面时间不要小于动画继续时间