diff --git a/src/views/project/ProjectStepForm.vue b/src/views/project/ProjectStepForm.vue
index 5326d2d..54030b4 100644
--- a/src/views/project/ProjectStepForm.vue
+++ b/src/views/project/ProjectStepForm.vue
@@ -59,6 +59,7 @@ export default {
}, //生命周期 - 销毁完成
data() {
return {
+ path: [],
title: '',
currentTab: 0,
currentTab: 0,
@@ -120,6 +121,9 @@ export default {
//下一步
nextStep(childValue, beChange) {
console.log('进入下一步', childValue, beChange)
+
+ //缓存当前步骤,用于上一步时往回跳tab
+ this.path.push(this.currentTab);
if (beChange) {
this.courseChange = beChange
}
@@ -134,11 +138,12 @@ export default {
}
}
console.log('currentTab key:', this.$refs.steps.$slots.default)
- console.log('currentTab:', this.currentTab, 'currentTab:', this.currentTab)
+ console.log('currentTab:', this.currentTab, 'path:', this.path)
console.log('ProjectStepForm表单数据', this.form)
},
//上一步
prevStep(childValue, beChange) {
+
if (beChange) {
this.courseChange = beChange
}
@@ -147,11 +152,9 @@ export default {
if (childValue) {
this.form = childValue
}
- if (this.form.projectType == 0 && this.currentTab == 2) {
- this.currentTab = 1
- } else {
- this.currentTab -= 1
- }
+ //跳到上一个tab页,剔除最后一个页码
+ let tab = this.path.pop();
+ this.currentTab = tab;
}
console.log('currentTab:', this.currentTab, 'currentTab:', this.currentTab)
console.log('ProjectStepForm表单数据', this.form)
diff --git a/src/views/project/form/ProjectCourseList.vue b/src/views/project/form/ProjectCourseList.vue
index be7b135..1ed49c7 100644
--- a/src/views/project/form/ProjectCourseList.vue
+++ b/src/views/project/form/ProjectCourseList.vue
@@ -45,7 +45,7 @@
上一步
下一步
保存
- 发布
+ 发布
diff --git a/src/views/project/form/ProjectPersonForm.vue b/src/views/project/form/ProjectPersonForm.vue
index 2a012bd..8b45cee 100644
--- a/src/views/project/form/ProjectPersonForm.vue
+++ b/src/views/project/form/ProjectPersonForm.vue
@@ -59,7 +59,7 @@
上一步
下一步
保存
- 发布
+ 发布