vuejs/v2.cn.vuejs.org

动态参数 的示例 attributeName 大小写错误

windqyoung opened this issue · 0 comments

文件: src/v2/guide/syntax.md

这里的 attributeName 会被作为一个 JavaScript 表达式进行动态求值,求得的值将会作为最终的参数来使用。例如,如果你的 Vue 实例有一个 data 属性 `attributeName`,其值为 "href",那么这个绑定将等价于 v-bind:href。

这个属性在 data中应该是纯小写. 我测试的时候使用 attributeName 提示 Property or method "attributename" is not defined on the instance but referenced during render.
改为 attributename 就好了.