🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

gyl-vue-range

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gyl-vue-range

在VUE框架基础上开发的一款简单的滑块插件。

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
3
-50%
Maintainers
1
Weekly downloads
 
Created
Source

gyl-vue-range

在VUE框架基础上开发的一款简单的滑块插件。

安装

npm i gyl-vue-range

自定义参数

width: 500 (滑块进度条宽,默认值500)
height: 10 (滑块进度条高,默认值10)
dotSize: 26 (圆点尺寸,默认值26)
max: 100 (最大值,默认值100)
min: 0 (最小值,默认值0)  

接收值方法

绑定callback方法,接收滑块进度值

       getRangeData(nowVal){
        this.value = nowVal
       }  
       

综合举例

<Range v-bind="rangeData" @callback="getRangeData"></Range>

  export default {
  name: 'app',
  data () {
    return {
      rangeData:{
        width:300,
        height:400,
        dotSize:50,
        min:50,
        max:1000
      },
      abc:null
    }
  },
  methods: {
      getRangeData(nowVal){
      this.abc = nowVal
  } 
  }
}

FAQs

Package last updated on 09 Aug 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts