1. Error cannot GET/ occurs during VUE project startup

The phenomenon of

When the project is successfully started, no error is reported in the command line window. When the browser enters the startup address, an error cannot GET/ is displayed

The solution

Change the port number and re-run NPM run dev

It is not allowed to assign read-only attributes in strict mode

The phenomenon of

There is no error on Chorme, but an error on IE

why

document.getElementById("body").style = ""
Copy the code

In strict mode, xxx.style is considered read-only, so an error is reported in IE

The solution

Separate the CSS properties and set the property values one by one

document.getElementById("body").style.width = "100%"
document.getElementById("body").style.overflow = "auto"
Copy the code