File tree 5 files changed +17
-4
lines changed
5 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 4
4
:active.sync =" isLoading"
5
5
color =" indigo"
6
6
loader =" dots"
7
- opacity =0.4
8
7
is-full-page
9
8
></loading >
10
9
<Layout >
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import Vue from 'vue';
4
4
import Vuex from 'vuex' ;
5
5
6
6
import authentication from './modules/authentication' ;
7
+ import { Loading } from './plugins' ;
7
8
8
9
Vue . use ( Vuex ) ;
9
10
@@ -12,8 +13,10 @@ const debug = process.env.NODE_ENV !== 'production';
12
13
const plugins = debug ? [
13
14
createLogger ( ) ,
14
15
// createPersistedState(),
16
+ Loading ,
15
17
] : [
16
18
createPersistedState ( ) ,
19
+ Loading ,
17
20
] ;
18
21
19
22
export default new Vuex . Store ( {
Original file line number Diff line number Diff line change
1
+ export { default as Loading } from './loading' ;
Original file line number Diff line number Diff line change
1
+ export default ( store ) => {
2
+ store . subscribeAction ( {
3
+ before : ( action ) => {
4
+ console . log ( `before action ${ action . type } ` ) ;
5
+ store . commit ( 'setLoading' , true , { root : true } ) ;
6
+ } ,
7
+ after : ( action ) => {
8
+ console . log ( `after action ${ action . type } ` ) ;
9
+ store . commit ( 'setLoading' , false , { root : true } ) ;
10
+ } ,
11
+ } ) ;
12
+ } ;
Original file line number Diff line number Diff line change @@ -2,9 +2,7 @@ module.exports = {
2
2
devServer : {
3
3
proxy : {
4
4
'/api' : {
5
- target : 'https://localhost:8000' ,
6
- ws : true ,
7
- changeOrigin : true ,
5
+ target : 'http://localhost:8000' ,
8
6
headers : {
9
7
Connection : 'keep-alive' ,
10
8
} ,
You can’t perform that action at this time.
0 commit comments