1.0.0 • Published 3 years ago

@lipn/progress-bar v1.0.0

Weekly downloads
-
License
GPL-3.0
Repository
-
Last release
3 years ago

Progress bar

Vuetify component that shows a progress bar.

Dependencies

Install

yarn add @lipn/progress-bar

Use

  1. First of all, import the plugin.
import Vue from 'vue';
import Vuetify from 'vuetify'
import 'vuetify/dist/vuetify.min.css'
import ProgressBar from 'progress-bar';

Vue.use(Vuetify);
Vue.use(ProgressBar);

new Vue({
  el: '#app',
  vuetify: new Vuetify(),
  // Global access to the dialog via $root.$progressBar
  mounted() {
    this.$root.$progressBar = this.$refs.progressBar;
  },
  methods: {
    save() {
      this.$root.$progressBar.show({ rounded: false, height: 6, opacity: 0.3, color: "info" });
      setTimeout(() => (this.$root.$progressBar.hide()), 3000)
    }
  }
};
  1. Insert component where you want to use it:
<html>
<body>
  <div id="app">
    <v-app>
      <!-- progress bar -->
      <progress-bar ref="progressBar"></progress-bar>
      <v-container>
        <!-- rest of the code -->
      </v-container>
    </v-app>
  </div>
</html>

Showcase

Showcase