feat(project): 初始化项目结构和配置
This commit is contained in:
Executable
+24
@@ -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