How do I share variables between several pages of vue?

after index.html logs in on login.html, the user name information is sent from the background.
then the page jumps to another.html,. How can the user name information be shared on other pages?

Mar.12,2021

localStorage,sessionStorage,cookie can transmit information across pages. How to use it depends on your project


http://www.lixuejiang.me/2016.


see what project you have structured
single page. The HTML page corresponding to load can declare a global variable
if it is a separate single page mode, it should be stored locally (localStorage and sessionStorage),) Cookie or Url bring parameters to transfer across pages.


vuex or localStorage,sessionStorage,cookie


username information is not suitable for caching. For security reasons, it is recommended that you use vuex.
vuex document address

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