From d6264f9e68fb45b64a213c1a69502b3624dff58e Mon Sep 17 00:00:00 2001 From: Kagol Date: Mon, 14 Aug 2023 16:33:19 +0800 Subject: [PATCH] fix: fix ts declaration error when execute pnpm build:ui vue command (#386) --- .gitignore | 1 + internals/cli/src/commands/build/build-entry.ts | 2 +- packages/vue-locale/src/vue3/index.ts | 2 +- packages/vue/mobile-first.ts | 2 +- packages/vue/src/chart/autonavi-map/src/AMapCoordSys.ts | 2 +- packages/vue/src/chart/autonavi-map/src/AMapModel.ts | 2 +- packages/vue/src/config-provider/src/index.vue | 2 +- packages/vue/src/query-builder/src/ts/propsUsingFrame.ts | 4 ++-- 8 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 145826697..08f1c3b25 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ coverage/ /packages/vue/index.ts /packages/vue/pc.ts /packages/vue/mobile.ts +/packages/vue/mobile-first.ts /packages/vue/app.ts /examples/**/playwright-report diff --git a/internals/cli/src/commands/build/build-entry.ts b/internals/cli/src/commands/build/build-entry.ts index 287013d26..d49b2d4c4 100644 --- a/internals/cli/src/commands/build/build-entry.ts +++ b/internals/cli/src/commands/build/build-entry.ts @@ -64,7 +64,7 @@ function getMainTemplate({ mode }) { export default { {{{components}}}, install - } + } as any ` } diff --git a/packages/vue-locale/src/vue3/index.ts b/packages/vue-locale/src/vue3/index.ts index 4e1c9d08a..6347f0b55 100644 --- a/packages/vue-locale/src/vue3/index.ts +++ b/packages/vue-locale/src/vue3/index.ts @@ -41,7 +41,7 @@ export const i18n = (fn) => { export const extend = _extend -interface InitI18nOption { +export interface InitI18nOption { app?: any createI18n?: Function messages?: Record diff --git a/packages/vue/mobile-first.ts b/packages/vue/mobile-first.ts index e492a20e8..14a8aa449 100644 --- a/packages/vue/mobile-first.ts +++ b/packages/vue/mobile-first.ts @@ -434,4 +434,4 @@ export default { UserHead, UserHeadGroup, install -} +} as any diff --git a/packages/vue/src/chart/autonavi-map/src/AMapCoordSys.ts b/packages/vue/src/chart/autonavi-map/src/AMapCoordSys.ts index 4ee235c57..3519afe59 100644 --- a/packages/vue/src/chart/autonavi-map/src/AMapCoordSys.ts +++ b/packages/vue/src/chart/autonavi-map/src/AMapCoordSys.ts @@ -105,7 +105,7 @@ export default class AMapCoordSys { return [pt.lng, pt.lat] } - getViewRect() { + getViewRect(): any { let api = this._api return new echarts.graphic.BoundingRect(0, 0, api.getWidth(), api.getHeight()) diff --git a/packages/vue/src/chart/autonavi-map/src/AMapModel.ts b/packages/vue/src/chart/autonavi-map/src/AMapModel.ts index 6a90016f0..2c14e26b9 100644 --- a/packages/vue/src/chart/autonavi-map/src/AMapModel.ts +++ b/packages/vue/src/chart/autonavi-map/src/AMapModel.ts @@ -31,4 +31,4 @@ export default echarts.extendComponentModel({ center: [116.397475, 39.908695], zoom: 4 } -}) +}) as any diff --git a/packages/vue/src/config-provider/src/index.vue b/packages/vue/src/config-provider/src/index.vue index a91fccc2d..c5d7e8b0a 100644 --- a/packages/vue/src/config-provider/src/index.vue +++ b/packages/vue/src/config-provider/src/index.vue @@ -94,5 +94,5 @@ export default defineComponent({ const tagName = this.props.tag.name ?? 'div' return hooks.h(tagName, attr, slots) } -}) +}) as any diff --git a/packages/vue/src/query-builder/src/ts/propsUsingFrame.ts b/packages/vue/src/query-builder/src/ts/propsUsingFrame.ts index f5bedfe17..5c8698cf5 100644 --- a/packages/vue/src/query-builder/src/ts/propsUsingFrame.ts +++ b/packages/vue/src/query-builder/src/ts/propsUsingFrame.ts @@ -1,8 +1,8 @@ interface ComponentType

{} interface ForwardRefExoticComponent

{} interface VueMouseEvent extends Event {} -interface VueNode {} -interface Ref {} +export interface VueNode {} +export interface Ref {} interface RefAttributes {} import type {