码迷,mamicode.com
首页 > 移动开发 > 详细

uniapp属性插值报错Interpolation inside attributes has been removed. Use v-bind or the colon shorthand instead.

时间:2019-09-19 00:40:32      阅读:365      评论:0      收藏:0      [点我收藏+]

标签:方法   简写   use   attribute   指令   bsp   rem   moved   解决方法   

解决方法:

 

因为vue 2.x不支持对属性使用插值{{}}的方式赋值,所以要使用v-bind指令(或简写“:”)来指定属性。

  • v-bind指令

  v-bind:id="item.id"

  • v-bind简写指令:
  :id="item.id"

uniapp属性插值报错Interpolation inside attributes has been removed. Use v-bind or the colon shorthand instead.

标签:方法   简写   use   attribute   指令   bsp   rem   moved   解决方法   

原文地址:https://www.cnblogs.com/XiaoYEBLog/p/11546343.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!