TypeError:Cannot read property ‘XXX’ of undefined
In fact, the problem itself is very simple, that is, when the page is initialized to load, the value has not been obtained may be empty, I also baidu have a look will have this error causes: 1: If there is a value, load it. If there is no value, do not load it. In the case of undefined, we can add a judgment not to undefined where necessary to operate on data 3: In my case, I have several methods. In order to check whether I can print data by calling the interface, I have included these methods in Mounted. Therefore, I have revisited the code, stroked the logic, and simply deleted it