From 65555d46a859bd4e17829fc8cb4f703ead4e4169 Mon Sep 17 00:00:00 2001 From: zouyaoji <370681295@qq.com> Date: Sat, 9 Oct 2021 23:32:38 +0800 Subject: [PATCH] fix: the error that version is undefined --- packages/components/viewer/index.ts | 3 ++- packages/utils/config.ts | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/components/viewer/index.ts b/packages/components/viewer/index.ts index 7651d005d..8c1744661 100644 --- a/packages/components/viewer/index.ts +++ b/packages/components/viewer/index.ts @@ -13,6 +13,7 @@ import { setConfig } from '@vue-cesium/utils/config' import { LocaleInjectionKey, localeProviderMaker } from '@vue-cesium/composables' import Viewer from './src' import useLog from '@vue-cesium/composables/private/use-log' +import { version } from '../../vue-cesium/version' const logger = useLog(undefined!) Viewer.install = (app: App, opts: InstallOptions): void => { @@ -35,7 +36,7 @@ Viewer.install = (app: App, opts: InstallOptions): void => { app.component(Viewer.name, Viewer) if (process.env.NODE_ENV === 'development') { - logger.capsule('VueCesium', `v${option.version}`) + logger.capsule('VueCesium', `v${version}`) logger.success('VueCesium https://github.com/zouyaoji/vue-cesium') logger.success('Document https://zouyaoji.top/vue-cesium') logger.success(`If you like it, give it a star reward, ^_^`) diff --git a/packages/utils/config.ts b/packages/utils/config.ts index 584738d08..53c518f39 100644 --- a/packages/utils/config.ts +++ b/packages/utils/config.ts @@ -4,11 +4,9 @@ const hasSymbol = typeof Symbol === 'function' && typeof Symbol.toStringTag === export interface InstallOptions { cesiumPath?: string accessToken?: string - lang?: any i18n?: (...args: any[]) => string scriptPromise?: Promise viewerUnloadingPromise?: Promise - version?: string cfg?: AnyObject locale?: any }