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

Vuejs warns about the direct mutation of the rating property #17

Open
yakubenko opened this issue Sep 12, 2018 · 1 comment
Open

Vuejs warns about the direct mutation of the rating property #17

yakubenko opened this issue Sep 12, 2018 · 1 comment

Comments

@yakubenko
Copy link

Hello! Thank you for the great component. I'm currently trying to integrate it in my project. Here is the piece of code that I'm using.

<fa-rating
  :glyph="star"
  :spacing="3"
  inactive-color="#d8cdc0"
  active-color="#e07706"
  :increment="0.5"
  :fixed-points="2"
  v-model="rating">
</fa-rating>

Unfortunately, I receive warnings and errors when I use v-model
I get no errors when I use :rating, but in both cases, I do not get any events fired.

I attach a screenshot. Please, have a look.
screenshot from 2018-09-12 11-25-23

@yakubenko
Copy link
Author

After some investigation, I managed to get it working. In my own components, I include Vuejs using this statement import Vue from 'vue/dist/vue.esm'; So, I explicitly tell Webpack to use the vue.esm build. After looking in the source code of the vue-rate-it I saw that it uses import Vue from 'vue';, hence I had to add an alias for the Vuejs in my webpack.conf.js.

resolve: {
        alias: {
            'vue$': 'vue/dist/vue.esm.js'
        }
    }

After doing so everything started working as expected. This forum thread helped me with the issue.

https://forum.vuejs.org/t/vue-warn-attrs-is-readonly/18053

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

1 participant