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

ng2-swiper5

v0.0.5

Published

Ng2Swiper是基于swiper5.3.0版本封装的一个用于angular2+的组件。 [演示地址](http://mdatav-ng.51wyq.cn/#/swiper/index)

Downloads

3

Readme

Ng2Swiper

Ng2Swiper是基于swiper5.3.0版本封装的一个用于angular2+的组件。 演示地址

安装说明

使用方法

api

目前只封装了swiper5的部分参数设置,后续会逐步添加。

basic 一般选项

名称 | 默认值 | 说明 ------|-------|------ initialSlide | 0 | 设定初始化时slide的索引 direction | 'horizontal' , 'vertical' | 滑动方向 speed | 300 | 切换速度 grabCursor | false | 鼠标覆盖Swiper时指针会变成手掌形状 parallax | false | 开启视差效果 parallaxImgUrl | string | 视差背景图 parallaxPer | '-23%' | 移动距离 parallaxOpacity | 0.5 | 视差透明度变化 parallaxScale | 0.5 | 视差缩放变化 parallaxDuration | 3000 | 设定视差动画持续时间(ms) autoHeight | false | 高度随内容变化 uniqueNavElements | false | 控制组件放在container外面的时候,需要用到 runCallbacksOnInit | false | 触发回调,如果不想触发,将此设置为false slidesPerColumnFill | 'column' , 'row' | 多行布局

Slides grid(网格分布)

名称 | 默认值 | 说明 ---------------------|---------|-------- centeredSlides | false | active slide会居中 centeredSlidesBounds | false | 使得第一个和最后一个Slide 始终贴合边缘 navigation | false | 左右箭头切换开关 slidesPerView | 1 | slider容器能够同时显示的slides数量 slidesPerGroup | 1 | 定义slides的数量多少为一组 slidesPerGroupSkip | 0 | 设置跳过分组 spaceBetween | 0 | 在slide之间设置距离(单位px) slidesPerColumn | 1 | 设置多行布局里面每列的slide数量

Free Mode (free模式/抵抗反弹)

名称 | 默认值 | 说明 -----------------------------|------|--------- freeMode | false | slide会根据惯性滑动可能不止一格且不会贴合 freeModeMomentum | true | free模式动量 freeModeMomentumRatio | 1 | 设置的值越大,当释放slide时的滑动时间越长 freeModeMomentumVelocityRatio | 1 | free模式惯性速度,设置越大,释放后滑得越快

其他参数

名称 | 默认值 | 说明 -----------------------------|------|--------- swiperCont | 'swiper-container' | 设置swiper的id paginationShow | true | 是否显示分页器 isObserver | true | 修改swiper自己或子元素时,自动初始化swiper autoplay | false | 自动播放 delay | 3 | 自动播放间隔时间(秒)