After using socket.io in vue, how to change the value in store after sockets gets the background data?

after the following settings, you can connect to the local server

import store from "./store"
import VueSocketio from "vue-socket.io";
import socketio from "socket.io-client";
Vue.use(VueSocketio, socketio("http://127.0.0.1:7777/"),store);

the next step is to get the background data and assign values

sockets: {
    getData: (data) => {
      console.log(this.$store); 
    }
}   

print out undefined. Try printing this in mounted using store
normally elsewhere. This is VueComponent {_ uid: 4, _ isVue: true, $options: {. }, _ renderProxy: Proxy, _ self: VueComponent,. }
print this in sockets is {a: { }}
a: {name: "Home", components: { }, sockets: {. }, mounted: premises, methods: {. }, which is the information for the current page.
what should I do


this.$store is the store object that Vuex automatically injects into each subcomponent of the instance for convenience. In fact, it is the store exposed in your store.js .
call in non-vue instance components can be directly introduced

import store from './store'

export default {
  sockets: {
    getData: (data) => {
      //store.state...
      //store.commit('')
      console.log(store);
    }
  }
}
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-1c15a1d-154c7.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-1c15a1d-154c7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?