Skip to content
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

Support for Vue 3? #65

Closed
patras1 opened this issue Feb 4, 2021 · 17 comments
Closed

Support for Vue 3? #65

patras1 opened this issue Feb 4, 2021 · 17 comments

Comments

@patras1
Copy link

patras1 commented Feb 4, 2021

Hi!!
I'm having those warnings and error after basic instalation:
warnings

Is it related to the fact its Vue 3 or if not... How can I resolve this issue?

Thanks!!
Dan

@saintplay
Copy link
Owner

It is related to Vue 3, no relevant clues how to resolve this for now. Other libraries are facing the same problem

@ConceptCodes
Copy link

Hey, I'm receiving the same error is there a workaround for it.

@saintplay
Copy link
Owner

Not for now, I will try to update the codebase to Vue3 this weekend

@Is0tope
Copy link

Is0tope commented Apr 29, 2021

Hi there. Just checking if there is any plan to migrate this in the end? I'd love to use this, but can't get it to work with Vue3.

@bcpletcher
Copy link

Also hoping there will be support for Vue3 soon, id hate to have to find an alternative option after using this for so long

@ismael7
Copy link

ismael7 commented Jun 7, 2021

excellent project, hope you update it to vue 3

@wobsoriano
Copy link

wobsoriano commented Jul 27, 2021

For the meantime if y'all wanna use it in Vue 3, you can check the implementation here https://codesandbox.io/s/v-swatch-vue3-2cj2w

Screen Shot 2021-07-28 at 3 41 14 AM

It uses https://github.com/privatenumber/vue-2-3

@faaizajaz
Copy link

faaizajaz commented Aug 12, 2021

@wobsoriano Thanks for this. Your example only partially works as far as I can tell...I am not seeing the selected color logged anywhere in the console.

EDIT: Seems like this is a problem with Codepen? The example works fine locally. Thanks again.

@cuteCloud
Copy link

great project, but hope vue 3 !!thanks!!

@wobsoriano
Copy link

great project, but hope vue 3 !!thanks!!

Published a Vue 3 copy of this for the meantime https://github.com/wobsoriano/vue3-swatches

@wobsoriano
Copy link

@wobsoriano Thanks for this. Your example only partially works as far as I can tell...I am not seeing the selected color logged anywhere in the console.

EDIT: Seems like this is a problem with Codepen? The example works fine locally. Thanks again.

https://github.com/wobsoriano/vue3-swatches

@faaizajaz
Copy link

@wobsoriano Awesome. Is this a drop in replacement? I'd love to get the vue-2-3 package out of my dependencies.

@wobsoriano
Copy link

@wobsoriano Awesome. Is this a drop in replacement? I'd love to get the vue-2-3 package out of my dependencies.

Yup!

@adamprocter
Copy link

adamprocter commented Sep 2, 2021

I have been using the vue 3 fork but am attempting the same trigger for calling a custom method but it is not being called I was wondering if you had any insight based on the original implementation which was working for me in vue2 here is new component (LINE 15) https://gitlab.adamprocter.co.uk/nn/nodenoggin-vue3/-/blob/main/src/components/MyNodes.vue and here is old component using vue 2 swatches (LINE 134) https://gitlab.adamprocter.co.uk/nn/nodenoggin/-/blob/main/app/src/components/NodesLayer.vue

@adamprocter
Copy link

adamprocter commented Sep 2, 2021

cant see why this doesnt work for vue3


<VSwatches
          v-model="nodes.node_color"
          :swatches="swatches"
          :shapes="shapes"
          @input="chooseColor(nodes.node_id, nodes.node_color)"
          show-border
          show-fallback
          fallback-input-type="color"
        >
          <template v-slot:trigger>
            <button @click.prevent>{{ nodes.node_color }}</button>
          </template>
        </VSwatches>

and the method

chooseColor(nodeid, color) {
      this.$store.dispatch('colorNode', { nodeid, color })
      setTimeout(this.loadData, 500)
    },

@adamprocter
Copy link

thank you have posted my code on the other repo issues for completeness

@joelpro2
Copy link

@adamprocter one of the reasons is because the v-model have some breaking changes.
In Vue 2 the defaults were prop: 'value', event: 'input'.
In Vue 3 the defaults are prop: 'modelValue', event: 'update:modelValue'

While on Vue 2, you could change your default event, in Vue 3 you cannot.

@patras1 patras1 closed this as completed Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests