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

rh-carousel

v1.1.3

Published

vue3轮播图,vue3多张轮播图,多张图片一起轮播, carousel

Downloads

21

Readme

Vue 3 + TypeScript + Vite

vue3 的轮播图

支持 1 张,2 张,多张一起轮播 alt 实例

npm 安装

npm install rh-carousel

pnpm 安装

pnpm install rh-carousel

yarn 安装

yarn add rh-carousel

/** main.js */
import "rh-carousel/lib/style.css"; // main.js 引入样式
import { createApp } from "vue";
// 全局注册
import Carousel from "rh-carousel";
createApp(App).use(Carousel);
// -----
//局部引入
import { RCascader, RCarouselItem } from "rh-carousel";
// 组件内使用
<RCascader :viewNum="3" width="1200px">
    <RCarouselItem>
      <div style="padding: 20px; height: 100%;">
        <div class="bg1">111</div>
      </div>
    </RCarouselItem>
    <RCarouselItem>
      <div style="padding: 20px; height: 100%;">
        <div class="bg2">2222</div>
      </div>
    </RCarouselItem>
    <RCarouselItem>
      <div style="padding: 20px; height: 100%;">
        <div class="bg3">3333</div>
      </div>
    </RCarouselItem>
    <RCarouselItem>
      <div style="padding: 20px; height: 100%;">
        <div class="bg4">4444</div>
      </div>
    </RCarouselItem>
    <RCarouselItem>
      <div style="padding: 20px; height: 100%;">
        <div class="bg5">5555</div>
      </div>
    </RCarouselItem>
    <template #left>111</template>
  </RCascader>

RCascader Props(属性)

| 属性 | 说明 | 默认值 | 类型 | | -------- | -------------- | ------ | -------------- | | width | 轮播图的宽度 | 500px | String, Number | | height | 轮播图的高度度 | 300px | String, Number | | viewNum | 可视数量 | 3 | Number | | interval | 自动轮播的时间 | 3000 | Number | | autoPlay | 是否自动轮播 | true | Boolean |

RCascader Slots(插槽)

| 插槽 | 说明 | | -------- | -------------- | | default | 轮播图的子项,必须是<RCarouselItem> | | left | 左按钮 <template #left>icon</template>| | right | 右按钮 <template #right>icon</template> |

RCarouselItem Props(属性)

轮播图子项

暂无属性

RCarouselItem Slots(插槽)

| 插槽 | 说明 | | -------- | -------------- | | default | 每一项的具体内容 |