Javascript 在vueJs thorugh v-bind中未呈现Bootsrap类

Javascript 在vueJs thorugh v-bind中未呈现Bootsrap类,javascript,vue.js,bootstrap-4,scripting,renderscript,Javascript,Vue.js,Bootstrap 4,Scripting,Renderscript,我试图通过v-bind在vueJs中呈现引导类,它给了我语法错误 SyntaxError:意外令牌(16:282) 我已经使用这段代码来呈现我的引导类 < span class="fa fa-fw field-icon" v-bind:class="{fa-eye:true, fa-eye-slash:false}" style = "font-size: 20px;" @click="switchVisibility"> </span> 其余的逻辑

我试图通过v-bind在vueJs中呈现引导类,它给了我语法错误

SyntaxError:意外令牌(16:282)

我已经使用这段代码来呈现我的引导类

< span class="fa fa-fw field-icon" v-bind:class="{fa-eye:true, fa-eye-slash:false}" 
       style = "font-size: 20px;" @click="switchVisibility">
</span>


其余的逻辑运作良好。我在这里犯了什么语法错误?

不能在对象键中取消引用
-
。请改为尝试
{'fa-eye':true,'fa-eye slash':false}
。使用as
v-bind:class=“{'fa-eye':true,'fa-eye slash':false}”
不能在对象键中取消引用
-
。请尝试使用as
v-bind:class=“{'fa-eye':true,'fa-eye slash':false}
。使用as
v-bind:class=“{'fa-eye':true,'fa-eye slash':false}”