tabs优化

This commit is contained in:
gary.fu
2023-12-29 17:22:14 +08:00
parent 7e6d0d2d1e
commit 773923d761
8 changed files with 76 additions and 16 deletions

View File

@@ -4,6 +4,7 @@ import { defineStore } from 'pinia'
export const useTabsViewStore = defineStore('tabsView', () => {
const isTabMode = ref(true)
const isCachedTabMode = ref(true)
const isShowTabIcon = ref(true)
const historyTabs = ref([])
const cachedTabs = ref([])
@@ -61,6 +62,7 @@ export const useTabsViewStore = defineStore('tabsView', () => {
return {
isTabMode,
isCachedTabMode,
isShowTabIcon,
historyTabs,
cachedTabs,
changeTabMode () {
@@ -75,6 +77,9 @@ export const useTabsViewStore = defineStore('tabsView', () => {
cachedTabs.value = []
}
},
changeShowTabIcon () {
isShowTabIcon.value = !isShowTabIcon.value
},
removeHistoryTab,
clearHistoryTabs,
findHistoryTab,