How to refer to global style issues in vue projects?

  1. recently defined a global style in a project
  2. the file is under src/assets/css/
  3. then introduce this style in the relative path in main.js
  4. then Red in the project directly uses clss to modify styles such as marggin, font

however, the problem arises. When packaged to the test environment, the style does not take effect when opens the page for the first time. When the page is refreshed, the style takes effect . Is the style file placed in the wrong place when requested? Should I put it under the static folder?

Oct.26,2021

write a global css file, and then quote it in App.vue 's style:

@import './assets/css/';

Global styles can be placed in index.html. Css can be placed in static without relying on vue


main.js to directly introduce import 'path'

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b389f0-2c145.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b389f0-2c145.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?