mirror of
https://github.com/jackhh66/ChatGPT_Web_accessToken.git
synced 2026-12-03 21:29:32 +00:00
feat: 预设 pinia 相关文件
This commit is contained in:
1 parent
797cc7461b
commit
b6e5c59a9c
9 files changed
+102
-12
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
interface AppState {
|
||||
siderCollapsed: boolean
|
||||
}
|
||||
|
||||
export const useAppStore = defineStore('app-store', {
|
||||
state: (): AppState => ({
|
||||
siderCollapsed: false,
|
||||
}),
|
||||
actions: {
|
||||
setSiderCollapsed(collapsed: boolean) {
|
||||
this.siderCollapsed = collapsed
|
||||
},
|
||||
toggleSiderCollapse() {
|
||||
this.siderCollapsed = !this.siderCollapsed
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,12 @@
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
interface HistoryState {
|
||||
list: any[]
|
||||
}
|
||||
|
||||
export const useHistoryStore = defineStore('history-store', {
|
||||
state: (): HistoryState => ({
|
||||
list: [],
|
||||
}),
|
||||
actions: {},
|
||||
})
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from './app'
|
||||
export * from './history'
|
||||
Reference in new issue
Block a user