All Projects → guan6 → vue-onlySlider-x

guan6 / vue-onlySlider-x

Licence: other
Vue的移动端Slider滑动组件。无依赖、功能单一,只有左右滑动功能。如果你需要的仅仅是一个banner,那你可能需要它!

Programming Languages

Vue
7211 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to vue-onlySlider-x

MTCircularSlider
A feature-rich circular slider control written in Swift.
Stars: ✭ 118 (+237.14%)
Mutual labels:  slider, slider-component
wui
Collection of GUI widgets for the web
Stars: ✭ 44 (+25.71%)
Mutual labels:  slider
Sliderawesome
A slider plugin full of various effects and styles that allows any customization. 一款可定制的风格效果多样的轮播图插件。
Stars: ✭ 204 (+482.86%)
Mutual labels:  slider
Roundslider
roundSlider - A free jQuery plugin
Stars: ✭ 232 (+562.86%)
Mutual labels:  slider
React Slider Kit
react-slider-kit is going to be a comprehensive solution to slider feature in react.
Stars: ✭ 219 (+525.71%)
Mutual labels:  slider
Flutter fluid slider
A fluid design slider that works just like the Slider material widget.
Stars: ✭ 232 (+562.86%)
Mutual labels:  slider
Angular Bootstrap Slider
an angularjs directive for seiyria-bootstrap-slider
Stars: ✭ 183 (+422.86%)
Mutual labels:  slider
SimpleSlider
A simple slider allows you to easily use.
Stars: ✭ 78 (+122.86%)
Mutual labels:  slider
MediaSliderView
Pure java based, highly customizable media slider gallery supporting both images and videos for android.
Stars: ✭ 85 (+142.86%)
Mutual labels:  slider
React Flickity Component
A React.js component for using @desandro's Flickity
Stars: ✭ 232 (+562.86%)
Mutual labels:  slider
Vue Glide
A slider and carousel as vue component on top of the Glide.js
Stars: ✭ 225 (+542.86%)
Mutual labels:  slider
React Native Swiper Flatlist
👆 Swiper component implemented with FlatList using Hooks & Typescript + strict automation tests with Detox
Stars: ✭ 217 (+520%)
Mutual labels:  slider
TimeRangePicker
A customizable, easy-to-use, and functional circular time range picker library for Android. Use this library to mimic Apple's iOS or Samsung's bedtime picker.
Stars: ✭ 266 (+660%)
Mutual labels:  slider
Ion.rangeslider
jQuery only range slider
Stars: ✭ 2,494 (+7025.71%)
Mutual labels:  slider
react-instagram-zoom-slider
🌄↔️ A slider component with pinch to zoom capabilities inspired by Instagram
Stars: ✭ 67 (+91.43%)
Mutual labels:  slider
Vue Infinite Slide Bar
∞ Infinite slide bar component (no dependency and light weight 1.48 KB)
Stars: ✭ 190 (+442.86%)
Mutual labels:  slider
Numberslidingpicker
Android Number Picker with gestures
Stars: ✭ 225 (+542.86%)
Mutual labels:  slider
Keen Slider
The HTML touch slider carousel with the most native feeling
Stars: ✭ 3,097 (+8748.57%)
Mutual labels:  slider
jquery.mb.slider
A lightweight javascript slider
Stars: ✭ 13 (-62.86%)
Mutual labels:  slider
ha-slider-card
Custom Slider Card for Home Assistant
Stars: ✭ 24 (-31.43%)
Mutual labels:  slider

vue-onlySlider-x

  • 内含支持vue1vue2版本的组件各一个
  • 默认是vue2的组件,vue1的组件相关文件,都放在 vue1.x目录中

Vue的移动端Slider组件。无依赖、功能单一,只有左右滑动功能。如果你需要的仅仅是一个banner,那你可能需要它!

DEMO 在移动端调试器或移动设备中查看

或扫描下面二维码:

vue-onlySlider-x 二维码

测试

运行 npm install,来安装所需的依赖模块。

运行 npm run dev,启动项目

在浏览器打开 http://127.0.0.1:9999 查看效果

使用方法

此组件为vue单文件组件,单文件组件使用请参见 单文件组件

组件参数:

  • items Array 图片数组(必选);
  • pagination Boolean 是否显示页码标记?默认为 true;
  • auto-play Boolean 是否自动播放?默认为 true;
  • speed Number 自动播放时间间隔,默认3000,单位毫秒;
  • sync Boolean 传入数据是否为同步的?默认为 false,(ajax返回再传入的视作异步);

VUE2的组件 新增参数

  • source-width Number 单图片真实宽度(单位px,必选);
  • source-height Number 单图片真实高度(单位px,必选);
  • loop Boolean 循环播放;
  • viewport-ratio Number 图片宽度百分比(与屏幕宽);
  • anims String 切换动画(需要动态改变的属性值格式如下);
    • {"id":0,"min":0.2,"max":1}
      • id 属性值标记
      • min 属性最小值
      • max 属性最大值

sync 属性说明

  • 默认为false,为防止组件ready时数据还不存在,初始会在数据有变化后才执行。
  • 如果是本地数据,则可以直接初始化,这时请必须添加 :sync="true" 属性。

items 数组默认结构

// vue1
var imgs = [
    {picUrl:'1.jpg',href:'/page1/'},
    {picUrl:'2.jpg',href:'/page2/'},
    ...
]

// vue2
var imgs = [
    {src:'1.jpg',href:'/page1/'},
    {src:'2.jpg',href:'/page2/'},
    ...
]

组件示例

<!-- vue1 -->
<slider :items="imgs" :pagination="true" :auto-play="true" :speed="1000" :sync="true"></slider>

<!-- vue2 -->
<slider
    :items="imgs"
    :source-width="750"
    :source-height="300"
    :loop="true"
    :viewport-ratio="80"
    :sync="true"
    anims='opacity:{"id":0,"min":0.2,"max":1};transform:scale({"id":1,"min":0.85,"max":1})'
>
</slider>

联系我

有问题?tell me (QQ:405171253)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].