feat(projects): 添加生产的主题配置缓存

This commit is contained in:
Soybean
2022-06-20 23:23:55 +08:00
parent 5c1b086cb4
commit 718c36263e
16 changed files with 137 additions and 48 deletions

View File

@@ -27,11 +27,9 @@
<script setup lang="ts">
import { ref, reactive, computed, nextTick, watch } from 'vue';
import { useEventListener } from '@vueuse/core';
import { ChromeTab, ButtonTab } from '@soybeanjs/vue-admin-tab';
import { Icon } from '@iconify/vue';
import { useThemeStore, useTabStore } from '@/store';
import { setTabRoutes } from '@/utils';
import { ContextMenu } from './components';
interface Emits {
@@ -95,11 +93,6 @@ watch(
immediate: true
}
);
/** 页面离开时缓存多页签数据 */
useEventListener(window, 'beforeunload', () => {
setTabRoutes(tab.tabs);
});
</script>
<style scoped></style>