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-u-carousel

v1.0.6

Published

push

Downloads

26

Readme

vue图片轮播插件

使用方法

components组件方式

下载./lib/vue-carousel.vue文件
import VueUCarousel from '~/components/vue-u-carousel.vue'
components:{
    'vue-u-carousel':VueUCarousel
}

插件方式

npm install vue-u-carousel

1.vue项目

import VueUCarousel from 'vue-u-carousel'

Vue.use(VueUCarousel)


<template>
  <section>
    <vue-u-carousel  :CarouselHeight="carouselH" :controlBtn="controlBtn" :imgArray="imgArray"></vue-u-carousel>
  </section>
</template>
<script>
  export default {
    data(){
      return{
        carouselH:'300px', //高度
        controlBtn:false  //是否添加左右控制btn
        /*
          参数说明:
          scr:图片地址
          href:图片a链接,无链接设置为#
          btn:在图片中自定义div区域使用a连接跳转 classname:类名,href:链接,若不使用btn:[]
          使用btn时一定要根据类名,定义样式
          此为默认参数
          imgArray:[
          {
              key: 1,
              src: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1521880846160&di=1da91620edd8082142e5802d4a4f967c&imgtype=0&src=http%3A%2F%2Fpic1.win4000.com%2Fwallpaper%2F4%2F57b6a7f82383b.jpg',
              alt: 'p1.png',
              href: 'http://www.baidu.com',
              btn: []
            },
            {
              key: 2,
              src: 'https://ss0.baidu.com/94o3dSag_xI4khGko9WTAnF6hhy/image/h%3D300/sign=d5a029d7befb4316051f7c7a10a54642/ac345982b2b7d0a2e4394d81c7ef76094b369a3e.jpg',
              alt: 'p2.png',
              href: '#',
              btn: [{key: 1, text: '去百度', classname: 'onimgbtn', href: 'http://www.baidu.com'}, {
                key: 2,
                classname: 'onimgbtn1',
                href: 'http://www.baidu.com'
              }]
            }
          ]
        */
      }
    }
  }
</script>
<style></style>

2.nuxt项目

请参考https://zh.nuxtjs.org/guide/plugins


新建./plugins/vue-u-carousel.js

import Vue from 'vue'
import VueCarousel from 'vue-u-carousel'

Vue.use(VueCarousel);

在./nuxt.config.js中:

...other code

 plugins: [
    {src: '~/plugins/vue-u-carousel.js', ssr: false}
  ]

...other code
build:{
    vendor: ['vue-u-carousel']
}