代码调整

This commit is contained in:
joylink_cuiweidong 2022-11-01 18:09:16 +08:00
parent 45243e1968
commit a91f0063d0

View File

@ -105,7 +105,7 @@ export default {
watch: { watch: {
'$store.state.trainingNew.stepOrder': function(val) { '$store.state.trainingNew.stepOrder': function(val) {
const stepList = JSON.parse(this.$store.state.trainingNew.trainingDetail.stepJson); const stepList = JSON.parse(this.$store.state.trainingNew.trainingDetail.stepJson);
if (val < stepList.length) { if (val >= 1 && val < stepList.length) {
const msg = {content:stepList[val].description, memberId:stepList[val].memberId}; const msg = {content:stepList[val].description, memberId:stepList[val].memberId};
this.$store.dispatch('socket/setTrainingStepTip', msg); this.$store.dispatch('socket/setTrainingStepTip', msg);
} else { } else {