How do I use vuex in a separate js file?

I want to reference the data in vuex in a js file? How do I use it?
this file a.js, do you want to use the data in vuex? What should I do?

Jun.13,2022

ide/" rel=" nofollow noreferrer > ide/" rel=" nofollow noreferrer "> https://vuex.vuejs.org/zh/guide/

// store.js
const store = new Vuex.Store({
  state: {
    count: 1
  },
  mutations: {
    increment (state) {
      // 
      state.countPP
    }
  }
})

export default store

// a.js
import store from './store.js'

console.log(store.state.count) // 1
store.commit('increment')
console.log(store.state.count)// 2

do you reference vuex in other js files

import store from './store.js';

console.log(store.state);
store.commit('xxx');

just quote store directly

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