File tree Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import progress from 'vite-plugin-progress'
6
6
import EslintPlugin from 'vite-plugin-eslint'
7
7
import PurgeIcons from 'vite-plugin-purge-icons'
8
8
import { ViteEjsPlugin } from 'vite-plugin-ejs'
9
+ // @ts -ignore
9
10
import ElementPlus from 'unplugin-element-plus/vite'
10
11
import AutoImport from 'unplugin-auto-import/vite'
11
12
import Components from 'unplugin-vue-components/vite'
Original file line number Diff line number Diff line change @@ -219,21 +219,19 @@ const handleAuthorized = () => {
219
219
if ( ! isRelogin . show ) {
220
220
isRelogin . show = true
221
221
ElMessageBox . confirm ( t ( 'sys.api.timeoutMessage' ) , t ( 'common.confirmTitle' ) , {
222
+ showCancelButton : false ,
223
+ closeOnClickModal : false ,
224
+ showClose : false ,
222
225
confirmButtonText : t ( 'login.relogin' ) ,
223
- cancelButtonText : t ( 'common.cancel' ) ,
224
226
type : 'warning'
227
+ } ) . then ( ( ) => {
228
+ const { wsCache } = useCache ( )
229
+ resetRouter ( ) // 重置静态路由表
230
+ wsCache . clear ( )
231
+ removeToken ( )
232
+ isRelogin . show = false
233
+ window . location . href = '/'
225
234
} )
226
- . then ( ( ) => {
227
- const { wsCache } = useCache ( )
228
- resetRouter ( ) // 重置静态路由表
229
- wsCache . clear ( )
230
- removeToken ( )
231
- isRelogin . show = false
232
- window . location . href = '/'
233
- } )
234
- . catch ( ( ) => {
235
- isRelogin . show = false
236
- } )
237
235
}
238
236
return Promise . reject ( t ( 'sys.api.timeoutMessage' ) )
239
237
}
You can’t perform that action at this time.
0 commit comments