File tree Expand file tree Collapse file tree 6 files changed +17
-14
lines changed Expand file tree Collapse file tree 6 files changed +17
-14
lines changed Original file line number Diff line number Diff line change 11
11
"dependencies" : {
12
12
"@vue/composition-api" : " ^1.0.0-rc.5" ,
13
13
"axios" : " ^0.21.1" ,
14
- "cl-admin" : " ^1.5.1 " ,
14
+ "cl-admin" : " ^1.5.3 " ,
15
15
"cl-admin-crud" : " ^1.6.4" ,
16
16
"cl-admin-theme" : " ^0.0.5" ,
17
17
"clipboard" : " ^2.0.7" ,
Original file line number Diff line number Diff line change 15
15
</template >
16
16
17
17
<script >
18
- import { mapMutations , mapGetters } from " vuex" ;
19
- import { firstMenu } from " @/cool/modules/base /utils" ;
18
+ import { mapMutations } from " vuex" ;
19
+ import { firstMenu } from " ../.. /utils" ;
20
20
21
21
export default {
22
22
name: " cl-menu-topbar" ,
@@ -28,10 +28,8 @@ export default {
28
28
},
29
29
30
30
computed: {
31
- ... mapGetters ([" menuGroup" ]),
32
-
33
31
list () {
34
- return this .menuGroup .filter (e => e .isShow );
32
+ return this .$store . getters . menuGroup .filter (e => e .isShow );
35
33
}
36
34
},
37
35
@@ -56,7 +54,7 @@ export default {
56
54
}
57
55
};
58
56
59
- this .menuGroup .forEach ((e , i ) => {
57
+ this .list .forEach ((e , i ) => {
60
58
deep (e, i);
61
59
});
62
60
},
@@ -67,7 +65,8 @@ export default {
67
65
onSelect (index ) {
68
66
this .SET_MENU_LIST (index);
69
67
70
- const url = firstMenu (this .menuGroup [index].children );
68
+ // 获取第一个菜单地址
69
+ const url = firstMenu (this .list [index].children );
71
70
this .$router .push (url);
72
71
}
73
72
}
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ export default {
137
137
// 监听消息
138
138
onMessage (msg ) {
139
139
// 回调
140
- this .$emit (" message" , this . visible );
140
+ this .$emit (" message" , msg );
141
141
142
142
// 消息通知
143
143
this .notification (msg);
Original file line number Diff line number Diff line change @@ -134,7 +134,6 @@ export default {
134
134
size: 20 ,
135
135
total: 0
136
136
},
137
- player: {},
138
137
voice: {
139
138
url: " " ,
140
139
timer: null
Original file line number Diff line number Diff line change 98
98
title =" 图片预览"
99
99
:visible.sync =" preview.visible"
100
100
:props =" {
101
- width: previewWidth
101
+ width: previewWidth,
102
+ 'append-to-body': true
102
103
}"
103
104
>
104
105
<img width =" 100%" :src =" preview.url" alt =" " />
Original file line number Diff line number Diff line change 1
1
import axios from "axios" ;
2
+ import { Message } from "element-ui" ;
2
3
import store from "@/store" ;
3
4
import { isDev } from "@/config/env" ;
4
5
import { href , storage } from "cl-admin/utils" ;
@@ -120,8 +121,11 @@ axios.interceptors.response.use(
120
121
break ;
121
122
122
123
case 403 :
123
- console . error ( `${ config . url } 无权限访问!!` ) ;
124
- href ( "/403" ) ;
124
+ if ( isDev ) {
125
+ Message . error ( `${ config . url } 无权限访问!!` ) ;
126
+ } else {
127
+ href ( "/403" ) ;
128
+ }
125
129
break ;
126
130
127
131
case 404 :
@@ -135,7 +139,7 @@ axios.interceptors.response.use(
135
139
136
140
case 502 :
137
141
if ( isDev ) {
138
- return Promise . reject ( " 服务异常!!" ) ;
142
+ Message . error ( ` ${ config . url } 服务异常!!` ) ;
139
143
} else {
140
144
href ( "/502" ) ;
141
145
}
You can’t perform that action at this time.
0 commit comments