VUE-COMPONENT-LOADING-SCREEN PLUGIN
Vue Component Loading screen is a simple plugin for show an indicator when your component is busy.
- You can activate/disable loading screens manually
- You can bind your screen states to [Axios].
Installation
$ npm install vue-component-loading-screen
Implementation
;; Vue;
Manual Screen Activation
name: 'HelloWorld' methods: { this; //->Activates loading screen /* Bunch of code doing something. .................. .............................. ......................................... */ this; // -> Disables loading screen }
Binding Screen States To Axios Instance
Loading screen activates before request sent and disables when response received or error occured.
; name: 'HelloWorld' methods: { var yourAxiosInstance = axios; this; ; }
OPTIONS
Option | Description | Is Required | Default Value |
---|---|---|---|
loadingImage | Path of your loading image | true | - |
overlayBackgroundColor | Loading screen background color. You can set HEX or RGB value | false | rgba(0,0,0,0.5) |
License
MIT