# vue-u-carousel

> push

Latest version **1.0.6** (published 2018-03-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-u-carousel
pnpm add vue-u-carousel
yarn add vue-u-carousel
bun add vue-u-carousel
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2018-03-29 |
| First published | 2018-03-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 96.5 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | rang |
| Maintainers | ranglong |

## Links

- npm: https://www.npmjs.com/package/vue-u-carousel
- Repository: https://github.com/rlnote/vue-carousel
- Homepage: https://github.com/rlnote/vue-carousel#readme
- Issues: https://github.com/rlnote/vue-carousel/issues
- npm.io page: https://npm.io/package/vue-u-carousel

## Dependencies (1)

- [vue](https://npm.io/package/vue.md) ^2.5.11

## Recent versions

- 1.0.6 (latest) — 2018-03-29
- 1.0.5 — 2018-03-24
- 1.0.4 — 2018-03-24
- 1.0.3 — 2018-03-24
- 1.0.2 — 2018-03-24
- 1.0.1 — 2018-03-24
- 1.0.0 — 2018-03-24

## 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']
}
```

--------------------------

---
_Source: https://npm.io/package/vue-u-carousel · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
