修复星标邮件列表不同步和图表空数据不为0
This commit is contained in:
@@ -272,6 +272,15 @@ watch(() => emailStore.cancelStarEmailId, () => {
|
||||
emailList.forEach(email => {
|
||||
if (email.emailId === emailStore.cancelStarEmailId) {
|
||||
email.isStar = 0
|
||||
console.log('取消')
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
watch(() => emailStore.addStarEmailId, () => {
|
||||
emailList.forEach(email => {
|
||||
if (email.emailId === emailStore.addStarEmailId) {
|
||||
email.isStar = 1
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
data-callback="onTurnstileSuccess"
|
||||
></div>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="setNameShow" title="修改名字" >
|
||||
<el-dialog v-model="setNameShow" title="修改用户名" >
|
||||
<div class="container">
|
||||
<el-input v-model="accountName" type="text" placeholder="名字" autocomplete="off">
|
||||
</el-input>
|
||||
|
||||
@@ -6,6 +6,7 @@ export const useEmailStore = defineStore('email', {
|
||||
starScroll: null,
|
||||
emailScroll: null,
|
||||
cancelStarEmailId: 0,
|
||||
addStarEmailId: 0,
|
||||
contentData: {
|
||||
email: null,
|
||||
delType: null,
|
||||
|
||||
@@ -140,6 +140,8 @@ function changeStar() {
|
||||
email.isStar = 0;
|
||||
starCancel(email.emailId).then(() => {
|
||||
email.isStar = 0;
|
||||
emailStore.cancelStarEmailId = email.emailId
|
||||
setTimeout(() => emailStore.cancelStarEmailId = 0)
|
||||
emailStore.starScroll?.deleteEmail([email.emailId])
|
||||
}).catch((e) => {
|
||||
console.error(e)
|
||||
@@ -149,6 +151,8 @@ function changeStar() {
|
||||
email.isStar = 1;
|
||||
starAdd(email.emailId).then(() => {
|
||||
email.isStar = 1;
|
||||
emailStore.addStarEmailId = email.emailId
|
||||
setTimeout(() => emailStore.addStarEmailId = 0)
|
||||
emailStore.starScroll?.addItem(email)
|
||||
}).catch((e) => {
|
||||
console.error(e)
|
||||
|
||||
Reference in New Issue
Block a user