diff --git a/src/upload/hooks/useUpload.ts b/src/upload/hooks/useUpload.ts index 077dc1a1e..5241b5972 100644 --- a/src/upload/hooks/useUpload.ts +++ b/src/upload/hooks/useUpload.ts @@ -1,7 +1,7 @@ import { computed, h, ref, toRefs, ComputedRef } from 'vue'; import isFunction from 'lodash/isFunction'; import isString from 'lodash/isString'; -import type { SizeLimitObj, TdUploadProps, UploadChangeContext, UploadFile, UploadRemoveContext } from '../type'; +import { SizeLimitObj, TdUploadProps, UploadChangeContext, UploadFile, UploadRemoveContext } from '../type'; import { useVModel } from '../../shared'; import { formatToUploadFile, diff --git a/src/upload/upload.tsx b/src/upload/upload.tsx index 4aad342b5..1feda9a9c 100644 --- a/src/upload/upload.tsx +++ b/src/upload/upload.tsx @@ -2,8 +2,8 @@ import { defineComponent, ref, computed, toRefs } from 'vue'; import { AddIcon, LoadingIcon, CloseIcon, CloseCircleIcon } from 'tdesign-icons-vue-next'; import TImage from '../image'; import TImageViewer from '../image-viewer'; -import { TdUploadProps, UploadFile } from './type'; -import props from './props'; +import { UploadFile } from './type'; +import UploadProps from './props'; import config from '../config'; import useUpload from './hooks/useUpload'; import { useTNodeJSX, useContent } from '../hooks/tnode'; @@ -13,7 +13,15 @@ const { prefix } = config; export default defineComponent({ name: `${prefix}-upload`, - props, + components: { + AddIcon, + LoadingIcon, + CloseCircleIcon, + CloseIcon, + TImage, + TImageViewer, + }, + props: UploadProps, emits: [ 'update:files', 'update:modelValue', @@ -87,13 +95,13 @@ export default defineComponent({