소스 검색

fix: 左侧使用异步加载

MTrun 3 년 전
부모
커밋
211e7b08c4
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      src/views/chart/ContentCharts/components/OptionContent/index.vue

+ 5 - 1
src/views/chart/ContentCharts/components/OptionContent/index.vue

@@ -20,9 +20,13 @@
 
 <script setup lang="ts">
 import { ref, watch, reactive, computed } from 'vue'
-import { ItemBox } from '../ItemBox/index'
 import { ConfigType } from '@/packages/index.d'
 import { useSettingStore } from '@/store/modules/settingStore/settingStore'
+import { loadAsyncComponent } from '@/utils'
+
+const ItemBox = loadAsyncComponent(() =>
+  import('../ItemBox/index.vue')
+)
 
 const props = defineProps({
   selectOptions: {