3 Star 0 Fork 2

Gitee 极速下载 / svg-progress-bar

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/chenxuan0000/svg-progress-bar
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

svg-progress-bar

A simple,progress bar for Vue.js

Build Status LICENSE MIT

🐾online demo | 🌾 simple demo | 📘 Chinese Document

Browser support

IEIE FirefoxFirefox ChromeChrome SafariSafari iOS SafariiOS Chrome for AndroidAndroid
IE9+

What is svg-progress-bar?

svg-progress-bar is a based on circles of the secondary development of project vue components

Features

  • zero dependence, small volume.
  • currently supports loop/rectangle progress bar.
  • the configuration meets a variety of requirements.
  • ongoing maintenance

Installation

NPM

npm install svg-progress-bar --save

Usage

ES6

Specific reference example-src/App.vue

// **main.js**
import Vue from 'vue'
import svg from 'svg-progress-bar'
// you can set componentName default componentName is svg-progress-bar
Vue.use(svg,{componentName: 'percent-bar'})
// 1.global install
import Vue from 'vue'
import svg from 'svg-progress-bar'
// you can set custom componentName
Vue.use(svg,{componentName: 'percent-bar'})

// 2.single .vue file install
<script>
  import svg from 'svg-progress-bar'
   export default {
      components: {
        svg
      }
   }
</script>

s

normal use (script tag)

Example:

Specific reference test/test.html

<html>
<head>
  ...
</head>
<body>
  <div id="app">
    <svg-progress-bar></svg-progress-bar>
  </div>
  <script src="vue.js"></script>
  <script src="svg-progress-bar"></script>
  <script>
    new Vue({
      el: '#app'
    })
  </script>
</body>
</html>

Configure list

key description default val
type type of the progress bar 'circle' 'circle' 'rect'
value value of the progress bar 0 Number String
valAddCalBack valAddCalBack of the progress bar [] [{value: 20,func: () => {this.dotValArr.per20 = 20}},{value: 40,func: () => {this.dotValArr.per40 = 40}}]
options options of the progress bar {} Object
options.valRate value add Rate of the circle progress bar(suggest <= 1) 1 Number
options.radius radius of the circle progress bar 50 Number
options.circleWidth stokeWidth of the circle progress bar 10 Number
options.varyStrokeArray varyStrokeArray of the circle progress bar if you want wide ranging null Array
options.circleLinecap circleLinecap of the circle progress bar '' 'round',''
options.maxValue maxValue of the progress bar 100 Number
options.text text of the progress bar function (value) {return this.htmlifyNumber(value)} Function
options.textColor text color of the progress bar #000 color
options.pathColors pathColors of the progress bar ['#EEE', '#F00'] Array
options.gradientColor gradientColor of the progress bar null Array
options.gradientOpacity gradientOpacity of the progress bar [1,1] Array
options.duration duration of the progress bar 500 Number
options.rectWidth rectWidth of the rect progress bar 400 Number
options.rectHeight rectHeight of the rect progress bar 40 Number
options.rectRadius rectRadius of the rect progress bar 0 Number

Changelog

See the GitHub release history.

License

svg-progress-bar is open source and released under the MIT License.

MIT License Copyright (c) 2018 xmanong Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

一个简单的 Vue.js 进度条组件 展开 收起
JavaScript 等 3 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/mirrors/svg-progress-bar.git
git@gitee.com:mirrors/svg-progress-bar.git
mirrors
svg-progress-bar
svg-progress-bar
master

搜索帮助