4

I am using vue-image-upload-resize in my Vue project.

All works fine except I have two issues

  1. How can I remove the text near the 'choose file' button?

enter image description here

  1. How can I reset the control after file upload? Basically when I try and upload the same file again, it does not call the setImage event. I do not want to use JQuery here

1 Answer 1

1

HTML:

<div class="input">
    <image-uploader></image-uploader>
</div>

CSS:

.input {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}
  1. You can use $refs

HTML:

<div class="input" @click="initiate">
    <image-uploader ref="image"></image-uploader>
</div>

JavaScript:

methods: {
    initiate() { this.$refs.image.$el.children[1].value = "" }
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.