VueJS 踩坑之组件注册中元素属性绑定

vue Interpolation inside attributes has been removed. Use v-bind or the colon shorthand instead. For example, instead of <div id="{{ val }}"use

这是我当时通过props传值给组件绑定id属性时出现的错误,出现这样的错误原因是vue 2.x是不支持对属性使用插值{{}}的方式赋值,需使用v-bind指令或者v-bind的简写冒号“:”来指定属性。

例如 我这样
VueJS 踩坑之组件注册中元素属性绑定

VueJS 踩坑之组件注册中元素属性绑定