vue开发中在页面代码中一律不能使用this

xiaoxiao2021-02-28  73

<div @click='this.limitNum=this.address.length'></div>

以上代码是错误的,因为当前代码的作用域就已经是this了 正确写法

<div @click='limitNum=address.length'></div>
转载请注明原文地址: https://www.6miu.com/read-52583.html

最新回复(0)