🚩 网站设置功能完成

This commit is contained in:
7836246
2024-03-03 18:29:15 +08:00
parent 263ad0a4df
commit c29c6790a1
12 changed files with 313 additions and 8 deletions
+28
View File
@@ -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',
}),
},
})