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

vue-scale

v1.2.0

Published

基于 better-scroll vue滑动刻度尺,他支持水平,垂直滑动。

Downloads

47

Readme

vue-scale

这是一个基于 better-scroll 滑动刻度尺,他支持水平,垂直滑动。

npm i vue-scale -S

列一

import VueScale from "vue-scale"
<VueScale v-model="value" />
data{
    return {
        value: 60
    }
}

列二

import VueScale from "vue-scale"
<VueScale v-model="value" :format="format" />
data{
    return {
        value: 60
    }
}
methods: {
    format(e) {
        return `${e}cm`
    }
}

演示

暂无 demo 显示》》

API

| 参数 | 说明 | 类型 | 默认值 | 版本 | | ------------ | ----------------------------------------- | ----------- | ---------- | ---- | | v-model | 初始化滑动位置(实时监听滑动 val) | Number | 0 | - | | type | 刻度尺类型 horizontal/verticality | String | horizontal | - | | max | 刻度尺最大刻度 | Number | 100 | - | | min | 刻度尺最小刻度 | Number | 0 | - | | ratio | 刻度尺刻度比例 | Number | 1 | - | | interval | 刻度尺刻度与刻度间隔 | Number | 8 | - | | group | 刻度尺刻度组 | Number | 10 | - | | flipVertical | 刻度尺刻水平/垂直翻转(与刻度尺类型关联) | Boolean | false | - | | mask | 刻度尺刻遮罩 (与刻度尺类型关联) | Boolean | true | - | | format | 刻度尺数字格式化 | Function(e) | - | - |

EVENT

| 参数 | 说明 | 类型 | 默认值 | 版本 | | --------- | -------------- | ----------------- | ------ | ---- | | scroll | 当前滑动中回调 | Function(value,e) | - | - | | scrollEnd | 当前滑动停止 | Function(value,e) | - | - |

说明:
1、刻度尺组件 type="verticality",请设置高度,默认 100%。
2、不提供任何 css props,然和样式你都可以修改,包括(背景图片)。
3、刻度尺的刻度是背景图片,你可以设置的自己背景图片结合 group 来修改成你想要的。