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-range-sliderc

v1.0.8

Published

<div align="center"> <h1>Vue-Range-Sliderc</h1> </div> <a href="https://www.npmjs.com/package/vue-range-sliderc"><img src="https://img.shields.io/npm/v/vue-range-sliderc.svg" /></a> <a href="https://npm-stat.com/charts.html?package=vue-range-sliderc"><

Downloads

38

Readme

基于vue的范围拖动条组件

demo

Features

  • 支持拖动播放以及定点播放
  • 根据数据索引来改变播放进度
  • 支持刻度线动态显示(为了更好的显示,尽量保证每个数据项文本长度一致)

Installation

$ npm install vue-range-sliderc
or
$ yarn add vue-range-sliderc

Usage

import VueRangeSilderc from 'vue-range-sliderc'
import 'vue-range-sliderc/lib/vue-range-sliderc.css'
Vue.use(VueRangeSilderc)
<template>
  <div class="app-wrapper">
    <vueRangeSilderc :dataArray="dataArray" :currentIndex="currentIndex" :isShowScaleLine="isShowScaleLine" @setDataIndex="setDataIndex"/>
  </div>
</template>
<script>

export default {
  data() {
    return {
      dataArray: [
        '2019-02-01 00',
        '2019-02-01 01',
        '2019-02-01 02',
        '2019-02-01 03',
        '2019-02-01 04',
        '2019-02-01 05',
        '2019-02-01 06',
        '2019-02-01 07',
        '2019-02-01 08',
        '2019-02-01 09',
        '2019-02-01 10',
        '2019-02-01 11',
        '2019-02-01 12',
        '2019-02-01 13',
        '2019-02-01 14',
        '2019-02-18 15',
        '2019-02-18 16',
        '2019-02-18 17',
        '2019-02-18 18',
        '2019-02-18 19',
        '2019-02-18 20',
        '2019-02-18 21',
        '2019-02-18 22',
        '2019-02-18 23',
        '2019-02-19 00'
      ],
      isShowScaleLine: true, // 是否显示刻度线
      currentIndex: 0 // 当前数据索引
    }
  },
  methods: {
    // 设置播放数据索引
    setDataIndex(index) {
      this.currentIndex = index
    },
  }
}
</script>

Demo

源码请前往 components 目录

Available props

| 参数 | 类型 | 默认值 | 备注 | | --------- | ------ |------ | --------------------------| | dataArray | Array | [] | Vue-Range-Slider数据列表 | | isShowScaleLine | Boolean | true | 是否显示刻度条 | | currentIndex | Number | 0 | 当前数据索引 |

Function

| 函数名 | 参数 | 备注 | | --------- | ------ | ------------------------------------------------------------ | | setDataIndex | index | 当前数据索引 |

期望

  1. 针对于不同数据项文本长度的不同 对刻度线显示进行优化
  2. 优化代码
  3. 增加更多自定义控制

License

MIT