initiate
This commit is contained in:
19
src/stores/saveInfo.ts
Normal file
19
src/stores/saveInfo.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { defineStore } from 'pinia'
|
||||
export default defineStore('speakInfo', {
|
||||
state: () => ({
|
||||
id: '',
|
||||
name: 0,
|
||||
type: '',
|
||||
positionName: '',
|
||||
day: ''
|
||||
}),
|
||||
persist: {
|
||||
enabled: true,
|
||||
strategies: [
|
||||
{
|
||||
key: 'speakInfo', // 持久化状态的键
|
||||
storage: localStorage // 使用localStorage来持久化状态
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user