How can the addRoutes method be used in other js files (such as util.js) in the vue-cli project? How to introduce router

router.addRoutes (routes);

I use router.addRoutes (routes); to report router is not defined in a js file

how to introduce router

I am using iview-admin

Mar.19,2021

introduces the js where you define the route


as referenced in your 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-1b31e65-2b622.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-1b31e65-2b622.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?