🚩 网站设置功能完成
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
|
||||
export const useSettingsStore = defineStore('settings', {
|
||||
state: () => {
|
||||
const {t} = useI18n()
|
||||
return {
|
||||
isHistory: true,
|
||||
linkOpenType: 'currentWindow',
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
setHistory(value: boolean) {
|
||||
this.isHistory = value
|
||||
},
|
||||
setLinkOpenType(value: string ) {
|
||||
this.linkOpenType = value
|
||||
},
|
||||
},
|
||||
getters: {
|
||||
getHistory: (state) => state.isHistory,
|
||||
},
|
||||
persist: {
|
||||
storage: persistedState.cookiesWithOptions({
|
||||
sameSite: 'strict',
|
||||
}),
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user