diff --git a/src/upload/__test__/index.test.jsx b/src/upload/__test__/index.test.jsx index b476278f9..34a470c5f 100644 --- a/src/upload/__test__/index.test.jsx +++ b/src/upload/__test__/index.test.jsx @@ -246,7 +246,6 @@ describe('Upload', () => { props, }); - const target = wrapper.findComponent(Upload); triggerUploadFile(wrapper, [ new File([new ArrayBuffer(1023)], 'foo.png', { type: 'image/png', @@ -254,7 +253,7 @@ describe('Upload', () => { ]); expect(wrapper.vm.uploadFiles.length).toBe(1); - target.vm.uploadFiles = []; + wrapper.vm.uploadFiles = []; triggerUploadFile(wrapper, [ new File([new ArrayBuffer(1025)], 'foo.png', { type: 'image/png', diff --git a/src/upload/upload.tsx b/src/upload/upload.tsx index d6769b986..37a5671c6 100644 --- a/src/upload/upload.tsx +++ b/src/upload/upload.tsx @@ -1,4 +1,4 @@ -import { defineComponent, ref, computed, toRefs } from 'vue'; +import { defineComponent, ref, computed } from 'vue'; import { AddIcon, LoadingIcon, CloseIcon, CloseCircleIcon } from 'tdesign-icons-vue-next'; import TImage from '../image'; import TImageViewer from '../image-viewer'; @@ -14,7 +14,6 @@ const { prefix } = config; export default defineComponent({ name: `${prefix}-upload`, components: { - AddIcon, TImage, }, props: UploadProps, @@ -147,7 +146,7 @@ export default defineComponent({ ))} {content()}