Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vuejs Warning expected boolean found string

Tags:

vuejs2

I am new to Vuejs, i just install vue-flip plugin at Nuxtjs and write this tag: This is the tag at index.vue:

<vue-flip active-hover="TRUE" class="flip">

and at the console i see this warning :

[Vue warn]: Invalid prop: type check failed for prop "activeHover". Expected Boolean, got String with value "TRUE"

I try to change from true to 1, but the keeps still remains

The message point to this location At:

---> <Flip> at src/Flip.vue
       <Pages/index.vue> at pages/index.vue
         <Nuxt>
           <Layouts/default.vue> at layouts/default.vue
             <Root>

How can i get rid of this message ?

like image 493
Ângelo Rigo Avatar asked May 09 '19 13:05

Ângelo Rigo


2 Answers

Instead of

<vue-flip active-hover="TRUE" class="flip">

you should use

<vue-flip v-bind:active-hover="true" class="flip">

or shorter

<vue-flip :active-hover="true" class="flip">
like image 73
dreijntjens Avatar answered Oct 09 '22 03:10

dreijntjens


The default when providing a prop with no value is true

Change this

<vue-flip active-hover="TRUE" class="flip">

to

<vue-flip active-hover class="flip">
like image 6
Bar Horing Amir Avatar answered Oct 09 '22 01:10

Bar Horing Amir