Modification of vue2 global variable [fragrant invitation code: 15MNA6]

global.js

export default {
  name: "Who",
  sex: "Male",
  setname (newName) {
    this.name = newName
    console.log("")
  }
}

main.js

import global_ from "./api/global"

Vue.prototype.GLOBAL = global_

Page 1

 created () {
    this.GLOBAL.setname("")
  },

Page 2

created () {
  console.log(this.GLOBAL.name)
}

the problem now is that the value of global does change when the page 1created, but it changes back when it is routed to page 2.
if the route jumps, can the value be passed only through route or local localstorage?

Mar.28,2021

vuex, bus

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