Values are transmitted between the two pages via Vuex

Store code: import Vue from'vue'
import router from '@/router/routes'
import Layout from '@/modules/layout/Layout'
import NestRoute from '@/modules/layout/NestRoute'

const Types = {
  ADD_PAGE_DETAIL: 'ADD_PAGE_DETAIL',
  SET_SKIN: 'SET_SKIN'} const state = {//'v1'Const getters = {skin: const const getters = {skin: const const getters = {skin: const const getters = {skin: State = > state. Skin} const mutations = {chandDatas (state, chandData) {state. ChandData = chandData / / the value}} const actions =  { chandDatas(ctx,chandData){ ctx.commit('chandDatas'ChandData)// Commit}}export default {
  state,
  actions,
  mutations,
  getters
}

Copy the code
Import {mapActions, mapState, mapGetters} from import {mapActions, mapState, mapGetters} from'vuex'
methods: {
    openDetails(row){
        this.$store.commit("chandDatas"@@@this.addPagedetail ({Component: ruleDetail, name: 'ruleDetail_${row.id}`,
                path: `/basedata/ruleDetail/${row.id}`,
                meta: {
                    id: row,
                    label: `${row.id}`,
                    parent: 'freight',
                    closable: true,
                    cache: false,
                },
                isActive:row.isActive
            }).then(() => {
                this.$router.push({ name: `ruleDetail_${row.id}'})})},}Copy the code
Import {mapActions, mapState, mapGetters} from'vuex'methods: { ... mapActions([ ]),fetchDetail() {
        let data2=this.$store.state.common.chandData; // Receive values},},Copy the code