How to globally reference js public files and stylus variable files in vue

how to globally reference js public files and stylus variable files in vue

Mar.28,2021

write to main.js


vue introduces js: < script > and css: < style >, all through src
if vue has introduced js files, then in the corresponding js file import
if it is a public function used in a large area, import


in main.js

stylus references global variables to modify build/utils.js files

stylus: generateLoaders('stylus',{import:[path.resolve('./src/shared/shared.styl')]}),

js public files do not know what you are going to do, but it is recommended to use vuex if you want to share variables. If you just need to execute some code before vue loads, you can introduce

into main.js.
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-1e4bae5-44e53.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-1e4bae5-44e53.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?