Article From:https://www.cnblogs.com/gaojian0927/p/9564391.html
// getters
const getters = {
netStatusMonitorData: state => {
return state.faultInfo;
},
 
};

 

const mutations = {
[baseTypes.UPDATE_DATA_MODULE](state) {
//oldcode
//state.faultInfo =pageData.dataSource;
 //After the assignment does not trigger the getter method to refresh, it changes the deep copy to trigger the getter refresh.
let tempData = {};
$.extend(true, tempData, pageData.dataSource);
state.faultInfo = tempData;
}
};

Leave a Reply

Your email address will not be published. Required fields are marked *