Scenes
Recently, there is a bug that occasionally occurs. In the production environment, the NavMenu component I use expands and closes the small arrows, and occasionally garbled characters will appear when refreshing. After searching the Internet for a long time, I finally located the problem.
The dependency package I use for this project is sass, and elementui uses node-sass. I found that the content: unicode character set in the app.css file in the package is not displayed as "\e790".
Garbled pictures are as follows
solve
1. Uninstall sass
npm uninstall sass --save
2. Install node-sass
npm install [email protected] --save-dev
tips
Let me explain the pit I stepped on.
At first I executed the following command
npm install node-sass --save-dev
I found that the dependency has not been able to be downloaded. Later, I read the Internet and said to change the version. I checked and found that the node-sass version in the package.json in the local element package seems to be 4.11.0. I am not sure, and then I installed this version No. node-sass still cannot be installed, so another version 4.14.1 mentioned on the Internet was installed successfully.
At this point, it is packaged again, and the character set displayed in the content in app.css is normal. The problem of occasional garbled characters in the production environment icon will be solved.