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 🙏

© 2025 – Pkg Stats / Ryan Hefner

swiper-base

v1.0.3

Published

## 轮播组件

Readme

轮播组件 swiper-base

轮播组件

  1. 安装
npm install --save swiper-base

2 使用

{
  "usingComponents": {
    "swiper-base": "swiper-base"
  }
}

3 参数说明 组件: 或者


属性:
  imgsData:图片地址信息(建议使用格式:[{img:'',id:''}])必传
  width:组件宽度,
  height:组件高度
  baseSet:面板基本功能设置
    {
       indicatorDots: true,//是否显示面板指示点
        indicatorColor: 'rgba(0, 0, 0, .3)',//指示点颜色
        indicatorActiveColor: '#000000',//当前选中的指示点颜色
        autoplay: true,//是否自动切换
        interval: 5000,//自动切换时间间隔
        duration: 1000,//滑动动画时长
        circular: true,//是否采用衔接滑动
        vertical: false//滑动方向是否为纵向
    }
  - - - - - - - -
  mode:见mode使用说明
  - - - - - - - -
  事件:
  change:改变触发事件
  navToDetail:触摸事件,(跳转详细页面)
  - - - - - - - -
  mode使用说明
    原生image 组件 mode 选择 默认为 scaleToFill
    缩放	scaleToFill	不保持纵横比缩放图片,使图片的宽高完全拉伸至填满 image 元素
    缩放	aspectFit	保持纵横比缩放图片,使图片的长边能完全显示出来。也就是说,可以完整地将图片显示出来。
    缩放	aspectFill	保持纵横比缩放图片,只保证图片的短边能完全显示出来。也就是说,图片通常只在水平或垂直方向是完整的,另一个方向将会发生截取。
    缩放	widthFix	宽度不变,高度自动变化,保持原图宽高比不变
    裁剪	top	不缩放图片,只显示图片的顶部区域
    裁剪	bottom	不缩放图片,只显示图片的底部区域
    裁剪	center	不缩放图片,只显示图片的中间区域
    裁剪	left	不缩放图片,只显示图片的左边区域
    裁剪	right	不缩放图片,只显示图片的右边区域
    裁剪	top left	不缩放图片,只显示图片的左上边区域
    裁剪	top right	不缩放图片,只显示图片的右上边区域
    裁剪	bottom left	不缩放图片,只显示图片的左下边区域
    裁剪	bottom right	不缩放图片,只显示图片的右下边区域