vue-upload-component icon indicating copy to clipboard operation
vue-upload-component copied to clipboard

Add drop active event

Open JoshMoreno opened this issue 5 years ago • 0 comments

This should resolve #333 and #254.

And for anyone who's having trouble; until this is merged you have two options:

Workaround 1

Use my package that fixes this issue until pr is merged P.S. I don't plan on maintaining the fork, just needed this issue fixed.

yarn add "JoshMoreno/vue-upload-component#add-dropActive-event"
# or
npm install --save "JoshMoreno/vue-upload-component#add-dropActive-event"

Workaround 2

Wait until all child components have been rendered and store in data so it's reactive https://vuejs.org/v2/api/#mounted

<template>
    <!-- store the component as a ref -->
    <VueUploadComponent ref="uploader"></VueUploadComponent>
</template>

<script>
    // then add a new data prop
    data() {
        uploader: null
    }

    // then add this to your mounted method
    mounted() {
        this.$nextTick(function(){
            this.uploader = this.$refs.uploader
        })
    }
</script>

JoshMoreno avatar Apr 05 '20 02:04 JoshMoreno