61 |
62 | Component Loaded !
63 |
64 |
65 |
79 | ```
80 |
81 | ## License
82 |
83 | [The MIT License](https://opensource.org/licenses/MIT)
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vue-component-loading",
3 | "version": "1.0.0",
4 | "description": "Vuejs package, allow you to manage a loading state inside all component, and to display a progressbar",
5 | "main": "src/index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": {
10 | "name": "Valentin Vivies - Bubbleflat",
11 | "email": "valentin@bubbleflat.com",
12 | "url": "https://bubbleflat.com"
13 | },
14 | "repository": {
15 | "type": "git",
16 | "url": "https://github.com/val-bubbleflat/vue-component-loading"
17 | },
18 | "keywords": [
19 | "vue",
20 | "vue-component-loading",
21 | "vue loading",
22 | "progressbar",
23 | "vue progressbar"
24 | ],
25 | "license": "MIT",
26 | "bugs": {
27 | "url": "https://github.com/val-bubbleflat/vue-component-loading/issues"
28 | },
29 | "homepage": "https://github.com/val-bubbleflat/vue-component-loading#readme",
30 | "dependencies": {
31 | "vue-progressbar": "^0.7.3"
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/Bus.js:
--------------------------------------------------------------------------------
1 | class Bus{
2 |
3 | constructor(){
4 | this.vue = null;
5 | }
6 |
7 | init(Vue){
8 | this.vue = new Vue();
9 | }
10 |
11 | $emit(event, arg){
12 | if(this.vue){
13 | this.vue.$emit(event, arg)
14 | }
15 | }
16 |
17 | $on(event, callback){
18 | if(this.vue){
19 | this.vue.$on(event, callback)
20 | }
21 | }
22 |
23 | }
24 |
25 | export default new Bus();
--------------------------------------------------------------------------------
/src/LoadingComponent.vue:
--------------------------------------------------------------------------------
1 |