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 🙏

© 2026 – Pkg Stats / Ryan Hefner

vue-ui-slide

v1.1.3

Published

轮播图,可自定义是否循环轮播,轮播时长等。

Readme

Installation

npm i vue-ui-slide --save

使用前须知

1.0.0以上,1.1.0以下版本 导出的是.vue文件,使用及配置如下:

使用npm安装以后,安装包目录中package.json有两个出口,jsnext:main,main,出口文件为.vue组件文件

  • 如果你的webpack配置包含如下配置,则可以正常引用
  module.exports = {
    resolve: {
      // 针对 Npm 中的第三方模块优先采用 jsnext:main 中指向的 ES6 模块化语法的文件
      mainFields: ['jsnext:main', 'main']
    },
  };
  • 否则需要babel对其进行转换配置
module.exports = {
    module: {
        rules: [{
            test: /\.vue$/,
            loader: 'vue-loader',
            include: [
                resolve('src'),
                resolve('node_modules/vue-ui-slide'),
            ],
            options: vueLoaderConfig
        }]
    }
}

1.1.0及以上版本支持vue ssr,无需配置,直接使用,如下:

  import 'vue-ui-slide/dist/component.css';
  import Slide from 'vue-ui-slide';

Usage

<template>
  <div class="example">
    <slide 
      v-if="pics.length > 0" 
      :duration="300" 
      effect="ease" 
      :init-index="1" 
      :loop="false" 
      :auto="false" 
      :show-page-index="false" 
      :bound-rate="0.1">

      <div class="slide-item" v-for="item in pics">
        <img :src="item">
      </div>
    </slide>
  </div>
</template>
<script>
  import slide from 'vue-ui-slide'

  export default {
    data() {
      return {
        pics: [
          imgUrl1, imgUrl2, imgUrl3
        ]
      }
    },
    components: {
      slide
    }
  }
</script>

组件props配置

  • auto 自动轮播,默认false
  • duration 轮播动画时间,默认400ms
  • effect 动画过渡效果,transition-timing-function,默认ease
  • delay 开始轮播延迟时间,默认4000ms
  • interval 轮播间隔时间,默认4000ms
  • loop 支持循环轮播,默认true
  • showPage 显示分页,默认true
  • showPageIndex 显示分页索引,从1开始,默认true
  • showBtn 显示上一页,下一页按钮,默认true
  • slideChange 轮播切换回调函数,function
  • isFullscreen 支持全屏显示,默认false,如果全屏显示,内部会停止自动轮播
  • initIndex 轮播初始化索引,从1开始,默认1
  • boundRate 轮播边界值(小数),如果触摸距离占轮播适口的比率大于该值,则轮播到上一屏或下一屏

更新说明

version 1.0.0之前版本不建议使用 version 1.0.0版本更新如下:

  • 内部代码采用最新(18/03/06)vue-cli脚手架测试;
  • 优化性能:首屏滑动,webkitTransitionEnd/transitionend事件监听,非循环轮播首屏向左/尾屏向右 计算滑动值优化,优化了小部分代码
  • 解决了获取css属性代码bug