New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

virtual-ruler

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

virtual-ruler

vue2 高性能刻度尺组件 ![image](https://github.com/zhouxianjun/vue-virtual-ruler/raw/master/src/assets/%E5%B1%8F%E5%B9%95%E5%BD%95%E5%88%B62020-07-10%20%E4%B8%8B%E5%8D%886.gif)

latest
Source
npmnpm
Version
0.1.5
Version published
Maintainers
1
Created
Source

vue virtual ruler

vue2 高性能刻度尺组件 image

Installation

npm install virtual-ruler --save
import 'virtual-ruler/dist/virtual-ruler.css';
import VirtualRuler from 'virtual-ruler'

export default {
    name: 'example',
    components: {
        VirtualRuler
    },
    data () {
        return {
            v2: 35
        }
    }
}

<virtual-ruler
    ref="ruler"
    top-border
    :height="50"
    :min="300"
    :max="2500"
    :default-value="v2"
    :gap="10"
    :value-gap="0.1" @change="v2 = $event">
</virtual-ruler>

API

Table Attributes

属性说明类型必选默认值
default-value默认值Numberfalsemin
min最小刻度值Numberfalse0
max最大刻度值Numberfalse100
gap刻度线间隔Numbertrue100
item-width刻度线宽度Number|Stringtrue100
item-color刻度线颜色Stringfalse#cccccc
item-height刻度线高度计算函数Function(index)false8、5、20
item-max-height刻度线最高高度Number|StringfalseMath.max(item-height)
point-width刻度标线宽度Number|Stringfalse1
point-color刻度标线宽度Stringfalse#00C5CD
point-style刻度标线自定义样式Objectfalse-
label-gap刻度值label间隔Numberfalse10
show-label是否显示刻度值labelBooleanfalsetrue
value-gap刻度值的倍数,例如刻度值为 100,倍数为0.1则值为100 * 0.1Numberfalse1
buffer缓冲数量,预先渲染Numberfalse10
height刻度尺高度Number|Stringtrue-
top-border刻度尺上边框Booleanfalsefalse
top-border-width刻度尺上边框宽度Number|Stringfalse1
top-border-color刻度尺上边框颜色Stringfalse#cccccc
linear-gradient刻度尺背景渐变Booleanfalsefalse
linear-gradient-direction-var刻度尺背景渐变方向Arrayfalse['to', 'right']
linear-gradient-color-var刻度尺背景渐变颜色Arrayfalse['rgba(255, 255, 255, 1)', 'rgba(255, 255, 255, 0) 25%', 'rgba(255, 255, 255, 0) 85%', 'rgba(255, 255, 255, 1) 100%']
auto-resize是否自动监听元素大小改变并重置刻度尺大小Booleanfalsefalse
label-style刻度值label样式Objectfalse-

slots

属性说明参数
label刻度值插槽value、index

Events

事件名说明参数
change滑动实时触发当前刻度值

Methods

方法名说明参数
setValue设置当前刻度值刻度值

Keywords

vue

FAQs

Package last updated on 21 Oct 2021

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