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

fix: fix the bug with render class ant-upload-drag-container in dom #6413

Conversation

Dmytro-Lukashenko
Copy link
Contributor

@Dmytro-Lukashenko Dmytro-Lukashenko commented Apr 2, 2023

Hello!
I have searched the issues of this repository and believe that this is not a duplicate.

Version
3.2.16

Environment
ant-design-vue 3.2.16;
vue-3.2.0

Reproduction link
https://codesandbox.io/s/a-upload-dragger-class-issue-nzg0v9?file=/src/App.vue

Steps to reproduce
There is an incorrect rendering of the class "ant-upload-drag-container" in DOM. If we use an empty tag <a-upload-dragger></a-upload-dragger>, the empty <div> with class "[object Object]-drag-container" renders in DOM.
upload_class_ids
This happens because of an error in string 397 of the Upload.tsx file.
<div class={${prefixCls}-drag-container}>{slots.default?.()}</div>
prefixCls - ComputedRef, not a string.
To fix this issue, we can modify the code to access the string value of the prefixCls object - prefixCls.value
My suggestion:
<div class={${prefixCls.value}-drag-container}>{slots.default?.()}</div>

upload-dragger-issue

What is expected?
The class "ant-upload-dragger-container" should be rendered in DOM

What is actually happening?
The class "[object Object]-drag-container" renders in DOM

@Dmytro-Lukashenko Dmytro-Lukashenko changed the title fix: fix bug with render class ant-upload-drag-container in dom fix: fix the bug with render class ant-upload-drag-container in dom Apr 3, 2023
@tangjinzhou tangjinzhou merged commit 9445dd2 into vueComponent:main Apr 4, 2023
Copy link

github-actions bot commented Apr 4, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants