vue控制台报错 TypeError: Cannot read property 'xxx' of undefined 调用该方法或函数请求的数据为空。
eg: var checkIndex = self.hxlist.findIndex((item1) => item1.name== "餐饮");
this.$refs.checkboxes[checkIndex].toggle(true);
餐饮不存在时,控制台报错TypeError: Cannot read property 'toggle' of undefined"