写小程序的时候报错 TypeError: Cannot set property ‘key’ of undefined console.log(data) 打印结果 undefined 检查调用问题,发现是data参数写掉了 加上data就解决了 记录一下自己的粗心造成的报错~