代码调整

This commit is contained in:
dong 2022-09-20 17:54:14 +08:00
parent 2892517d36
commit bc9d81c301

View File

@ -89,13 +89,15 @@ export default {
}
});
window.addEventListener('storage', e => {
if (e.key == 'setTrainingOperate') {
const operate = JSON.parse(e.newValue);
this.$store.dispatch('trainingNew/setTrainingOperate', operate);
}
if (e.key == 'setSceneOperate') {
const operate = JSON.parse(e.newValue);
this.$store.dispatch('trainingNew/setSceneOperate', operate);
if (this.$route.path.includes('trainingDesign')) {
if (e.key == 'setTrainingOperate') {
const operate = JSON.parse(e.newValue);
this.$store.dispatch('trainingNew/setTrainingOperate', operate);
}
if (e.key == 'setSceneOperate') {
const operate = JSON.parse(e.newValue);
this.$store.dispatch('trainingNew/setSceneOperate', operate);
}
}
});
this.$nextTick(() => {