报错如下
Vue wran]: Method "onLogin" has already been defined as a prop.
原因:
一个组件内,props、data、computed、methods都会被挂载到vue实例(vm)上,因此不能重名
解决:
【[Vue warn]: Method xx has already been defined as a prop】1、命名避开重名
2、在watch监听里写
报错如下
Vue wran]: Method "onLogin" has already been defined as a prop.
原因:
一个组件内,props、data、computed、methods都会被挂载到vue实例(vm)上,因此不能重名
解决:
【[Vue warn]: Method xx has already been defined as a prop】1、命名避开重名
2、在watch监听里写