Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[T-UPLOAD] uploadref.triggerUpload is not a function #3315

Open
KKKKri opened this issue Sep 12, 2024 · 1 comment
Open

[T-UPLOAD] uploadref.triggerUpload is not a function #3315

KKKKri opened this issue Sep 12, 2024 · 1 comment

Comments

@KKKKri
Copy link

KKKKri commented Sep 12, 2024

tdesign-vue 版本

1.9.6

重现链接

No response

重现步骤

<script setup> ..... const uploadref = ref(); const selectFile = function(){ uploadref.value = ''; uploadref.triggerUpload(); // uploadref.value.triggerUpload(); }; </script>

以上为我的大致代码,我希望在每次上传之前重置uploadref的值以防止我下次上传时无法发送上传的请求(这是我从网上找到的解决方法),但是这样会导致我第一次都无法打开文件选择器,浏览器的控制台报错uploadref.value.triggerUpload is not a function,请问该怎么解决,或者不使用uploadref.value = ''来重置上传组件的值,那我该如何保证第一次上传完毕后再次上传能够正常发送请求

微信截图_20240912173157

期望结果

能够正常在第一次上传后再次选择文件发送上传请求

实际结果

No response

框架版本

No response

浏览器版本

No response

系统版本

Windows11

Node版本

16

补充说明

No response

Copy link
Contributor

👋 @KKKKri,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant