JSPM

vue3-progress

0.0.1-beta4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 615
  • Score
    100M100P100Q95105F
  • License MIT

A vue3 component of progress bar.

Package Exports

  • vue3-progress
  • vue3-progress/src/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vue3-progress) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

cover

vue3-progress

license npm downloads

A vue3 progress bar component in which custom colors are supported

一款 vue3 进度条组件 支持自定义喜欢的颜色

This Vue Component is now Type Script Compatible!

Demo

Live Demo

Install

$ npm i vue3-progress

Usage

main.js

import Vue3Progress from "vue3-progress";

const options = {
  position: "fixed",
  height: "3px",
  // color: "<Your Color>",
};

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() // start the loading
this.$progress.finish() // finish the loading
this.$progress.height(4) // resize the height of loading bar to 4px

License

MIT

Vue.js - The Progressive JavaScript Framework

vue-ins-progress-bar 一款 ins 风格的 vue 进度条组件