fix,去掉大部分indexdb的逻辑
This commit is contained in:
1 parent
9a045cfe86
commit
3d26b0b259
19 files changed
+416
-103
No files matched your search
@@ -10,8 +10,8 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, defineAsyncComponent, markRaw, onBeforeUnmount, onMounted, ref } from 'vue'
|
||||
import localforage from 'localforage'
|
||||
import TypeLine from '@/layout/typeLine.vue'
|
||||
import { useKvStore } from '@/pinia/kv'
|
||||
|
||||
const infoView = markRaw(defineAsyncComponent(() => import('@/components/views/info.vue')))
|
||||
const scaleInfoView = markRaw(defineAsyncComponent(() => import('@/components/views/xmInfo.vue')))
|
||||
@@ -27,6 +27,7 @@ const PROJECT_INFO_KEY = 'xm-base-info-v1'
|
||||
const PROJECT_INIT_CHANGED_EVENT = 'xm-project-init-changed'
|
||||
|
||||
const hasProjectBaseInfo = ref(false)
|
||||
const kvStore = useKvStore()
|
||||
|
||||
const fullXmCategories = [
|
||||
{ key: 'info', label: '基础信息', component: infoView },
|
||||
@@ -42,7 +43,7 @@ const xmCategories = computed(() =>
|
||||
|
||||
const refreshProjectBaseInfoState = async () => {
|
||||
try {
|
||||
const data = await localforage.getItem(PROJECT_INFO_KEY)
|
||||
const data = await kvStore.getItem(PROJECT_INFO_KEY)
|
||||
hasProjectBaseInfo.value = Boolean(data)
|
||||
} catch (error) {
|
||||
console.error('read project base info failed:', error)
|
||||
|
||||
Reference in new issue
Block a user