diff --git a/src/components/ChartItemSetting/PositionSetting.vue b/src/components/ChartItemSetting/PositionSetting.vue index 0c05f489..5e5ca2fe 100644 --- a/src/components/ChartItemSetting/PositionSetting.vue +++ b/src/components/ChartItemSetting/PositionSetting.vue @@ -101,7 +101,6 @@ const props = defineProps({ }) const positonHandle = (key: string) => { - console.log(key) switch (key) { // 局左 case positionList[0]['key']: diff --git a/src/main.ts b/src/main.ts index da4c8778..7dc599e8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,7 +3,7 @@ import App from './App.vue' import router, { setupRouter } from '@/router' import i18n from '@/i18n/index' import { setupStore } from '@/store' -import { setupNaive, setupDirectives, setupCustomComponents, setupPreviewPackages } from '@/plugins' +import { setupNaive, setupDirectives, setupCustomComponents } from '@/plugins' import { AppProvider } from '@/components/AppProvider/index' import { setHtmlTheme } from '@/utils' import 'animate.css/animate.min.css' @@ -22,9 +22,6 @@ async function appInit() { // 注册全局自定义组件 setupCustomComponents(app) - // 预览页面注册() - setupPreviewPackages(app) - // 挂载状态管理 setupStore(app) diff --git a/src/plugins/customComponents.ts b/src/plugins/customComponents.ts index 693fcc53..a11ea0b2 100644 --- a/src/plugins/customComponents.ts +++ b/src/plugins/customComponents.ts @@ -1,26 +1,6 @@ import type { App } from 'vue' import { Skeleton } from '@/components/Skeleton' import { LoadingComponent } from '@/components/LoadingComponent' -import { getLocalStorageInfo } from '@/views/preview/utils/index' -import { fetchChartComponent } from '@/packages/index' -import { CreateComponentType } from '@/packages/index.d' - -/** - * * 预览页面动态注册 package 组件 - * @param app - */ -export const setupPreviewPackages = (app: App) => { - if (document.location.hash.includes('preview')) { - const localStorageInfo = getLocalStorageInfo() - if (!localStorageInfo) return - localStorageInfo.componentList.forEach(async (e: CreateComponentType) => { - if (!app.component(e.key)) { - const chart = fetchChartComponent(e.chartConfig) - app.component(e.key, chart) - } - }) - } -} /** * 全局注册自定义组件 diff --git a/src/plugins/index.ts b/src/plugins/index.ts index 36a3dae2..c500f63a 100644 --- a/src/plugins/index.ts +++ b/src/plugins/index.ts @@ -1,4 +1,4 @@ export { setupNaive } from '@/plugins/naive' export { setupDirectives } from '@/plugins/directives' -export { setupCustomComponents, setupPreviewPackages } from '@/plugins/customComponents' +export { setupCustomComponents } from '@/plugins/customComponents' export { icon } from '@/plugins/icon' diff --git a/src/views/chart/ContentCharts/components/ItemBox/index.vue b/src/views/chart/ContentCharts/components/ItemBox/index.vue index 16f80108..f6035d2c 100644 --- a/src/views/chart/ContentCharts/components/ItemBox/index.vue +++ b/src/views/chart/ContentCharts/components/ItemBox/index.vue @@ -20,7 +20,7 @@