![cover](https://user-images.githubusercontent.com/11075892/98070512-4b2e7780-1e9c-11eb-885f-b13c91cee889.png)
vue3-progress
![downloads](https://img.shields.io/npm/dm/vue3-progress?color=%23ad43a7)
A vue3 component of progress bar the custom colors are supported
一款 vue3 进度条组件 支持自定义喜欢的颜色
Demo
Live Demo
Install
$ npm i vue3-progress
Usage
main.js
import Vue3Progress from "vue3-progress";
const options = {
position: "fixed",
height: "3px",
};
createApp(App).use(Vue3Progress, options).mount("#app");
App.vue
<template>
<div id="app">
<vue3-progress />
<router-view />
</div>
</template>
<script>
export default {
name: "App",
mounted() {
this.$progress.finish();
},
created() {
this.$progress.start();
this.$router.beforeEach((to, from, next) => {
this.$progress.start();
next();
});
this.$router.afterEach((to, from) => {
this.$progress.finish();
});
},
};
</script>
APIs
this.$progress.start()
this.$progress.finish()
this.$progress.height(4)
License
MIT
Links
Vue.js - The Progressive JavaScript Framework
vue-ins-progress-bar 一款 ins 风格的 vue 进度条组件