Socket
Book a DemoInstallSign in
Socket

@msidolphin/vue-progress

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@msidolphin/vue-progress

vue进度条组件

1.0.3
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

v-progress

vue进度条组件

安装

npm install @msidolphin/vue-progress

使用

import Vue from 'vue'

import VueProgress from '@msidolphin/vue-progress'

Vue.use(VueProgress)
<script>
export default {
  name: 'App',
  data () {
    return {
      percent: 0.8
    }
  },
  mounted () {
    this.timer = setInterval(() => {
      this.percent = Math.random()
    }, 1000)
  },
  beforeDestroy () {
    clearInterval(this.timer)
  }
}
</script>

<template>
  <div id="app">
    <v-linear-progress
      className="hover"
      :chunks="20"
      :colors="['red', 'blue', 'orange']"
      :percent="percent"
      curve="linear"
    />
    <br/>
    <v-linear-progress
      className="hover"
      :chunks="44"
      :percent="percent"
    />
  </div>
</template>

<style scoped>
.hover {
  width: 360px;
  height: 36px;
  border-color: #000;
}
.hover:hover {
  border-color: red;
}
</style>

配置

v-linear-progress

属性类型默认值说明
percentnumber0进度所占比例 [0 - 1]
chunksnumber20分块数量
chunkGapsnumber1分块间距
chunkColorstringrgba(0,0,0,.2)分块的背景色
colorsarray['#56D6C7', '#409BFF']进度条背景色
durationnumber300动画时长
curvestringeaseInQuad动画缓动函数

缓动函数可选值

  • linear
  • easeInQuad
  • easeOutQuad
  • easeInOutQuad
  • easeInCubic
  • easeOutCubic
  • easeInOutCubic
  • easeInQuart
  • easeOutQuart
  • easeInOutQuart
  • easeInQuint
  • easeOutQuint
  • easeInOutQuint
  • easeInSine
  • easeOutSine
  • easeInOutSine
  • easeInExpo
  • easeOutExpo
  • easeInOutExpo
  • easeInCirc
  • easeOutCirc
  • easeInOutCirc
  • easeInElastic
  • easeOutElastic
  • easeInOutElastic
  • easeInBack
  • easeOutBack
  • easeInOutBack
  • easeInBounce
  • easeOutBounce
  • easeInOutBounce

FAQs

Package last updated on 23 Apr 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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.