diff --git a/packages/products/tdesign-vue-next/src/common.ts b/packages/products/tdesign-vue-next/src/common.ts index 689048813..39baf4f71 100644 --- a/packages/products/tdesign-vue-next/src/common.ts +++ b/packages/products/tdesign-vue-next/src/common.ts @@ -1,4 +1,5 @@ /** Vue3 特有全局类型 */ +import { CSSProperties } from 'vue'; type VNode = import('vue').VNode; export type ScopedSlot = () => SlotReturnValue; export type SlotReturnValue = VNode | string | boolean | null | undefined | SlotReturnArray; @@ -27,9 +28,7 @@ export type FormResetEvent = Event; // export type FormSubmitEvent = SubmitEvent; (for higher typescript version) export type FormSubmitEvent = Event; -export interface Styles { - [css: string]: string | number; -} +export type Styles = CSSProperties; export interface UploadDisplayDragEvents { onDrop?: (event: DragEvent) => void; diff --git a/packages/scripts/types/global/vue3.tpl b/packages/scripts/types/global/vue3.tpl index 6613e661a..cf51ea5ff 100644 --- a/packages/scripts/types/global/vue3.tpl +++ b/packages/scripts/types/global/vue3.tpl @@ -1,4 +1,5 @@ /** Vue3 特有全局类型 */ +import { CSSProperties } from 'vue'; type VNode = import('vue').VNode; export type ScopedSlot = () => SlotReturnValue; export type SlotReturnValue = VNode | string | boolean | null | undefined | SlotReturnArray; @@ -27,9 +28,7 @@ export type FormResetEvent = Event; // export type FormSubmitEvent = SubmitEvent; (for higher typescript version) export type FormSubmitEvent = Event; -export interface Styles { - [css: string]: string | number; -} +export type Styles = CSSProperties; export interface UploadDisplayDragEvents { onDrop?: (event: DragEvent) => void;