当前位置:首页 > 移动开发 > 正文

uniapp属性插值报错Interpolation inside attributes has been removed

2024-03-31 移动开发

解决方法:

 

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

  • v-bind指令

  v-bind:id="item.id"

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

温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/yidong/20321.html