vue-loader-mixin
Preloader mixin for Vue.js, internally using resource-loader.
Installation
npm i vue-loader-mixin --save
Usage
var loaderMixin = ; var root = mixins: loaderMixin events: 'load:progress': 'onLoadProgress' 'load:complete': 'onLoadComplete' // Static manifest manifest: // ... { // If you need to dynamically create the manifest this$optionsmanifest = // ... ; } { // Explicit call this; } methods: { thisprogress = eventprogress; } { thisprogress = 1; // You can use the load:complete event with the `wait-for` directive } ;
Events
This mixin emits load:start
, load:progress
, load:complete
and load:error
on the target vm.