Skip to content

Does not work with vue3 + @vue/compat (Migration Build 3) #410

@muratkemaldar

Description

@muratkemaldar

Hi,

I have been using this library with vue2, now I am upgrading to vue3.
For supporting older libraries with vue2, I am using @vue/compat in MODE: 2.
@vue/compat is supposed to make vue2 libraries work with vue3, and it has helped me with other libraries, but this library is having problems.

"@vue/compat": "^3.2.20",
"vue": "^3.2.16",

I have tried both

"vue-upload-component": "^2.8.22"
"vue-upload-component": "^3.0.50" (next)

and both don't work, and have different problems.

vue-upload-component@2:

After I choose an image (via input), the "Cropper" screen to crop the image appears, BUT when I hit save, I get following error:

image

image

Something is wrong with this.files, as it has now a Proxy object, and indexOf returns -1.

My guess was that it has something to do with this new WATCH_ARRAY behavior in vue3:
https://v3.vuejs.org/guide/migration/watch.html#overview

With @vue/compat, you can opt-out of certain (new) behaviours (like WATCH_ARRAY), but this didn't help for my application.

Here is the doc of the Migration Build (vue/compat):
https://v3.vuejs.org/guide/migration/migration-build.html

vue-upload-component@next:

After I choose an image (via input), the "Cropper" screen to crop the image no longer appears.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy