vue-blu icon indicating copy to clipboard operation
vue-blu copied to clipboard

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

Open viamin opened this issue 7 years ago • 9 comments

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.

viamin avatar May 21 '17 04:05 viamin

Guessing it should be 'class': String instead?

Youdaman avatar May 21 '17 06:05 Youdaman

+1

kevcodez avatar Jun 22 '17 09:06 kevcodez

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

nghiatv avatar Jul 21 '17 19:07 nghiatv

still there

yanhamu avatar Jul 23 '17 18:07 yanhamu

more or less when this is going to be solved?

raideltorres avatar Jul 25 '17 01:07 raideltorres

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

sorin21 avatar Sep 18 '17 09:09 sorin21

Same error here!

jairodemorais avatar Dec 06 '17 14:12 jairodemorais

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 .

raideltorres avatar Dec 06 '17 14:12 raideltorres

@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.

galbacarys avatar Dec 21 '17 23:12 galbacarys