chenz24 / vue-blu

UI Component Library Base on Vue.js(2.x) and Bulma
MIT License
1.58k stars 225 forks source link

Datepicker warning: "class" is a reserved attribute and cannot be used as component prop #81

Open viamin opened 7 years ago

viamin commented 7 years ago

I'm seeing this warning in my console when using the Datepicker component.

[Vue warn]: "class" is a reserved attribute and cannot be used as component prop.
found in
---> <DatePicker> at .../node_modules/vue-blu/src/components/datepicker/Datepicker.vue

Datapicker.vue has this:

   props: {
    options: {
      type: Object,
      default() {},
    },
    name: String,
    placeholder: String,
    val: String,
    value: {},
    class: String,
  },

The class prop isn't used in the component as far as I can tell.

Youdaman commented 7 years ago

Guessing it should be 'class': String instead?

kevcodez commented 7 years ago

+1

nghiatv commented 7 years ago

did it in npm? yarn upgrade vue-blu still has warn?

yanhamu commented 7 years ago

still there

raideltorres commented 7 years ago

more or less when this is going to be solved?

sorin21 commented 7 years ago

The error is still there. I looked to the code and class is still in the

  props: {
    options: {
      type: Object,
      default() {},
    },
    name: String,
    placeholder: String,
    val: String,
    value: {},
    class: String,
  }

I removed myself but I still get the error

"class" is a reserved attribute and cannot be used as component prop

jairodemorais commented 6 years ago

Same error here!

raideltorres commented 6 years ago

as a workaround till they merge the solution what I did was add the library as local (so npm wont rewrite my change) and removed the class: String line from the file I'm using, remember to do this from the .min file is as well. Maybe that's your issue @sorin21 .

galbacarys commented 6 years ago

@raideltorres @jairodemorais I've put in a PR for this and reached out to @chenz24 a few times to see if he can close this. I haven't heard anything back, but in the meantime the fork on my account has the fix.