本文介绍了Vuejs警告预期布尔值找到字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是 Vuejs 的新手,我只是在 Nuxtjs 上安装了 vue-flip 插件并写了这个标签:这是 index.vue 中的标签:
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"
我尝试从 true 更改为 1,但保留仍然存在
I try to change from true to 1, but the keeps still remains
消息指向这个位置在:
---> <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 ?
推荐答案
代替
<vue-flip active-hover="TRUE" class="flip">
你应该使用
<vue-flip v-bind:active-hover="true" class="flip">
或更短
<vue-flip :active-hover="true" class="flip">
这篇关于Vuejs警告预期布尔值找到字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!