保存
This commit is contained in:
7
mail-vue/src/store/account.js
Normal file
7
mail-vue/src/store/account.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
export const useAccountStore = defineStore('account', {
|
||||
state: () => ({
|
||||
currentAccountId: 0,
|
||||
})
|
||||
})
|
||||
13
mail-vue/src/store/email.js
Normal file
13
mail-vue/src/store/email.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
export const useEmailStore = defineStore('email', {
|
||||
state: () => ({
|
||||
deleteIds: 0,
|
||||
starScroll: null,
|
||||
emailScroll: null,
|
||||
readEmail: {},
|
||||
}),
|
||||
persist: {
|
||||
pick: ['readEmail'],
|
||||
},
|
||||
})
|
||||
7
mail-vue/src/store/send.js
Normal file
7
mail-vue/src/store/send.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
export const useSendStore = defineStore('send', {
|
||||
state: () => ({
|
||||
deleteId: 0
|
||||
})
|
||||
})
|
||||
21
mail-vue/src/store/setting.js
Normal file
21
mail-vue/src/store/setting.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { settingQuery} from "@/request/setting.js";
|
||||
|
||||
export const useSettingStore = defineStore('setting', {
|
||||
state: () => ({
|
||||
domainList: [],
|
||||
settings: {
|
||||
title: '-'
|
||||
}
|
||||
}),
|
||||
actions: {
|
||||
async initSetting() {
|
||||
if (this.domainList.length === 0) {
|
||||
const data = await settingQuery()
|
||||
this.domainList.push(...data.domainList)
|
||||
delete data.domainList
|
||||
this.settings = data
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
13
mail-vue/src/store/ui.js
Normal file
13
mail-vue/src/store/ui.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
export const useUiStore = defineStore('ui', {
|
||||
state: () => ({
|
||||
asideShow: window.innerWidth > 991,
|
||||
loginLoading: false,
|
||||
accountShow: false,
|
||||
init: true,
|
||||
}),
|
||||
persist: {
|
||||
pick: ['accountShow'],
|
||||
},
|
||||
})
|
||||
7
mail-vue/src/store/user.js
Normal file
7
mail-vue/src/store/user.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
export const useUserStore = defineStore('user', {
|
||||
state: () => ({
|
||||
user: {},
|
||||
})
|
||||
})
|
||||
7
mail-vue/src/store/writer.js
Normal file
7
mail-vue/src/store/writer.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
export const useUserStore = defineStore('user', {
|
||||
state: () => ({
|
||||
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user