vue.js - vue编译报错 failed to compile template

查看:259
本文介绍了vue.js - vue编译报错 failed to compile template的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问 题

升级vue1.0到2.0的过程中出现编译问题:截图如下

应该就是
<li v-for="(i, index) in list" class="list-li-click" v-bind:class="'message' + index % 5" v-bind:style="{background : i.bgColor };{color : i.color}" :data-text="i.text" @click="sendMessage">{{i.text}}</li>
有错误
请大神帮忙看看

解决方案

v-bind:style="{background : i.bgColor, color: i.color}"

这篇关于vue.js - vue编译报错 failed to compile template的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆