From 22088e820c79a9832179c8fb7c5cffe30b9b57e9 Mon Sep 17 00:00:00 2001 From: vben Date: Fri, 5 Feb 2021 22:30:55 +0800 Subject: [PATCH] fix(type): fix .vue file type error --- src/components/Form/src/types/index.ts | 1 - src/types/tsx.d.ts | 19 +++++++++++++++++++ src/types/vue-app-env.d.ts | 20 -------------------- 3 files changed, 19 insertions(+), 21 deletions(-) create mode 100644 src/types/tsx.d.ts diff --git a/src/components/Form/src/types/index.ts b/src/components/Form/src/types/index.ts index b492022b..f81d8744 100644 --- a/src/components/Form/src/types/index.ts +++ b/src/components/Form/src/types/index.ts @@ -105,7 +105,6 @@ export type ComponentType = | 'RangePicker' | 'WeekPicker' | 'TimePicker' - | 'ImageUpload' | 'Switch' | 'StrengthMeter' | 'Upload' diff --git a/src/types/tsx.d.ts b/src/types/tsx.d.ts new file mode 100644 index 00000000..1cb0bdef --- /dev/null +++ b/src/types/tsx.d.ts @@ -0,0 +1,19 @@ +import type { ComponentRenderProxy, VNode } from 'vue'; + +declare global { + namespace JSX { + // tslint:disable no-empty-interface + type Element = VNode; + // tslint:disable no-empty-interface + type ElementClass = ComponentRenderProxy; + interface ElementAttributesProperty { + $props: any; + } + interface IntrinsicElements { + [elem: string]: any; + } + interface IntrinsicAttributes { + [elem: string]: any; + } + } +} diff --git a/src/types/vue-app-env.d.ts b/src/types/vue-app-env.d.ts index c33b6e84..87bc1fa5 100644 --- a/src/types/vue-app-env.d.ts +++ b/src/types/vue-app-env.d.ts @@ -3,23 +3,3 @@ declare module '*.vue' { const Component: ReturnType; export default Component; } - -import type { ComponentRenderProxy, VNode } from 'vue'; - -declare global { - namespace JSX { - // tslint:disable no-empty-interface - type Element = VNode; - // tslint:disable no-empty-interface - type ElementClass = ComponentRenderProxy; - interface ElementAttributesProperty { - $props: any; - } - interface IntrinsicElements { - [elem: string]: any; - } - interface IntrinsicAttributes { - [elem: string]: any; - } - } -} -- GitLab