-
Notifications
You must be signed in to change notification settings - Fork 694
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
dropActive bug when upload component is wrapped by other component #254
Comments
I run into the same issue. Have you found a solution? |
Nope =( |
Here's a solution: <el-button @click="handleUpload">Open Dialog</el-button>
<el-dialog :visible.sync="uploadVisible" ...>
<div v-show="uploader && uploader.dropActive" class="drop-active">
<h3>Drop to Upload</h3>
</div>
<file-upload ref="upload" ...>Click Or Drop Files</file-upload>
</el-dialog> data(){
return {
uploader: false
}
},
methods:{
handleUpload() {
this.uploadVisible = true;
// this.$refs.upload -> undefined
this.$nextTick(() => {
// this.$refs.upload -> Vue Component
this.uploader = this.$refs.upload;
});
}
} |
For anyone who's having problems with this, see my pr #346 for workarounds until the pr gets merged |
I'm using vue-upload-component inside vue-js-modal component:
When I'm opening a modal and trying to drag files - the .drop-active doesn't showing up ( but files dragging properly)
And .drop-active doesn't showing up until I have drag or upload files using a button. After that it works fine.
It happens only if vue-upload-component is inside vue-js-modal component.
The text was updated successfully, but these errors were encountered: