-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
封装Upload组件后使用UploadDragger拖拽上传无法触发上传 #5312
Labels
untriaged
need to sort
Comments
This issue does not have any recent activity. If you are still experiencing similar problems, open a new error, including a minimal copy of the problem |
因为这导致了 |
Hi,这样的二次封装解决了问题: import { NUpload, type UploadProps } from 'naive-ui'
import api from '~api/common'
export default defineComponent<UploadProps>((_, { attrs, slots }) => {
const action = API_URL + api.upload()
return () => h(NUpload, { action, ...attrs }, {
default: () => slots.default?.(),
})
}) 所以这甚至可能是个SFC的问题,导致了defineComponent与SFC表现不一致? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TuSimple/naive-ui version (版本)
2.35.0
Vue version (Vue 版本)
3.3.4
Browser and its version (浏览器及其版本)
117.0.5938.149
System and its version (系统及其版本)
MacOS(13.6)
Node version (Node 版本)
v20.3.1
Reappearance link (重现链接)
https://codesandbox.io/p/sandbox/naive-issue-report-tkdwmt
Reappearance steps (重现步骤)
拖放文件到UploadDragger上传
Expected results (期望的结果)
拖放文件到UploadDragger内正常触发上传
Actual results (实际的结果)
拖放文件到UploadDragger内无法触发上传,点击上传正常
Remarks (补充说明)
The text was updated successfully, but these errors were encountered: