File tree Expand file tree Collapse file tree 2 files changed +30
-17
lines changed Expand file tree Collapse file tree 2 files changed +30
-17
lines changed Original file line number Diff line number Diff line change 1- import indexVue from './index.vue' ;
1+ import indexVue from './index'
22
33function plugin ( Vue , options ) {
4-
5- var myPluginVue = Vue . extend ( indexVue ) ;
4+ var myPluginVue = Vue . extend ( indexVue )
65 var vm = new myPluginVue ( {
76 data : {
87 isLoading : false
98 }
10- } ) . $mount ( ) ;
11- // document.getElementById( 'app' ).appendChild( vm.$el );
12- document . body . appendChild ( vm . $el ) ;
13-
9+ } ) . $mount ( )
10+ document . body . appendChild ( vm . $el )
1411 Vue . prototype . $isLoading = function ( isLoading ) {
15- vm . changeStatus ( isLoading ) ;
12+ vm . changeStatus ( isLoading )
1613 }
17-
18- // Vue.prototype.$isLoading = function(){
19- // vm.changeStatus( isLoading );
20- // }
2114}
2215
23- export default plugin ;
16+ export default plugin
Original file line number Diff line number Diff line change 77
88<script >
99 export default {
10- data : function () {
10+ data () {
1111 return {
1212 isLoading: false
1313 }
1414 },
1515 methods : {
16- changeStatus : function ( isLoading ){
17- this .isLoading = isLoading;
16+ changeStatus ( isLoading ){
17+ this .isLoading = isLoading
1818 }
1919 }
2020 }
21- </script >
21+ </script >
22+
23+ <style scoped>
24+ .loading {
25+ position : fixed ;
26+ left : 0 ;
27+ top : 0 ;
28+ right : 0 ;
29+ bottom : 0 ;
30+ height : 100% ;
31+ z-index : 99999 !important ;
32+ width : 100% ;
33+ background-color : rgba (0 , 0 , 0 , 0.6 );
34+ }
35+ .loading i {
36+ position : absolute ;
37+ opacity : 1 ;
38+ left : 48vw ;
39+ top : 48vh ;
40+ }
41+ </style >
You can’t perform that action at this time.
0 commit comments