Home > Article > Web Front-end > Summary of debugging methods for blank pages in Vue under ie10
This time I will bring you a summary of the debugging method of Vue's blank page under ie10. What are the precautions for debugging Vue's blank page under ie10? The following is a practical case, let's take a look.
Found the problem
A Vue I wrote a few days ago is blank under IE, and f12 displaysscript1003: expected :. So there is this article...
Solution process
Baidu and Google said that the last item of json is redundant Commas, such as{ a: 5, b: 4, // 最后一项不能有逗号 }are not displayed when searching and correcting all js files, but the situation remains the same. . . I have no choice but to show my invincible and wise debugging skills: Remove the full text Continuing with the previous smart debugging techniques, I finally discovered several bugs. . . Under this plug-in, the last item of all
objects has a comma, which makes it incompatible under IE
{ a: 5, b: 4, // 这个逗号要删除 }
// ie下不支持这种语法 export default { bind() {} } // 必须在外面定义 function bind() {} 然后 export default { bind: bind } // 特别告诫,下面这种语法在ie中也是不支持的 export default { bind }The most important thing is that this plug-in is in a very hidden place There are two lines of code
if(condition) { someArray.push({ a, b }) } else { anotherArray.push({ a, b }) }The syntax {a, b} is not supported by IE and must be changed to {a: a, b: b}A whole morning is wasted like this Okay, do you think I want to spray this plug-in? I want to say, whoever uses ie is a dog
The above is the detailed content of Summary of debugging methods for blank pages in Vue under ie10. For more information, please follow other related articles on the PHP Chinese website!