fix: 修复typescript一些编译报错

This commit is contained in:
郝先瑞
2022-01-19 23:40:25 +08:00
parent 16ebb4eb22
commit 9e15f53869
9 changed files with 74 additions and 61 deletions

View File

@@ -45,7 +45,7 @@ const tagsViewStore = defineStore({
},
delOthersVisitedViews(view: any) {
delOtherVisitedViews(view: any) {
return new Promise(resolve => {
this.visitedViews = this.visitedViews.filter(v => {
return v.meta?.affix || v.path === view.path
@@ -54,7 +54,7 @@ const tagsViewStore = defineStore({
})
},
delOthersCachedViews(view: any) {
delOtherCachedViews(view: any) {
return new Promise(resolve => {
const index = this.cachedViews.indexOf(view.name)
if (index > -1) {
@@ -90,10 +90,10 @@ const tagsViewStore = defineStore({
})
})
},
delOthersViews(view: any) {
delOtherViews(view: any) {
return new Promise(resolve => {
this.delOthersVisitedViews(view)
this.delOthersCachedViews(view)
this.delOtherVisitedViews(view)
this.delOtherCachedViews(view)
resolve({
visitedViews: [...this.visitedViews],
cachedViews: [...this.cachedViews]