fix(web): connectStatus not change when connected backend abort connection; fix relative URL parse; fix loadWebCatalog ElMessage bug
This commit is contained in:
1 parent
693c13e0f1
commit
554626b297
7 files changed
+95
-79
No files matched your search
@@ -0,0 +1,24 @@
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
export const useConnectionStore = defineStore('connection', {
|
||||
state: () => {
|
||||
return {
|
||||
connectStatus: '正在连接后端服务器……',
|
||||
connectType: 'primary' as 'primary' | 'success' | 'danger',
|
||||
newConnect: false,
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
setConnectStatus(connectStatus: string) {
|
||||
if (this.newConnect === true) return
|
||||
this.connectStatus = connectStatus
|
||||
},
|
||||
setConnectType(connectType: 'primary' | 'success' | 'danger') {
|
||||
if (this.newConnect === true) return
|
||||
this.connectType = connectType
|
||||
},
|
||||
setNewConnect(newConnect: boolean) {
|
||||
this.newConnect = newConnect
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in new issue
Block a user