报错 "Method 'xxx' has already been defined as a data property"
vue会把methods和data的东西,全部代理到vue生成对象中。
会产生覆盖所以最好不要同名
键名优先级:props > data > methods
报错 "Method 'xxx' has already been defined as a data property"
vue会把methods和data的东西,全部代理到vue生成对象中。
会产生覆盖所以最好不要同名
键名优先级:props > data > methods