Skip to content

Uncaught TypeError: this.$refs.cropper.getResult is not a function #192

Answered by AlexanderRN
AlexanderRN asked this question in Q&A
Discussion options

You must be logged in to vote

I think I solved it by changing the v-for to:

           <div v-for="(image, index) in this.images" :key="image">
                <cropper ref="cropper" class="upload-example__cropper"
                         check-orientation :src="image.src"/>
                <button v-if="image.src" class="upload-example__button" @click="crop(index)">Crop</button>
                <!--<div class="upload-example__reset-button" title="Reset Image" @click="reset()"></div>-->
                <div class="upload-example__file-type" v-if="image.type">
                    {{ image.type }}
                </div>
            </div>

And the crop function to:

           crop(index) {
                console.log(t…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@AlexanderRN
Comment options

@AlexanderRN
Comment options

@Norserium
Comment options

Comment options

You must be logged in to vote
1 reply
@Norserium
Comment options

Answer selected by AlexanderRN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants