Explorar el Código

fix(courseAdd): 修复未传入courseInfoId时activeKey未重置的问题

tanshanming hace 6 meses
padre
commit
1402f977b6
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      src/views/courseAdd/index.vue

+ 3 - 0
src/views/courseAdd/index.vue

@@ -43,6 +43,9 @@
 	watch(
 		() => props.courseInfoId,
 		(newVal) => {
+			if (!newVal) {
+				activeKey.value = '1'
+			}
 			localCourseInfoId.value = newVal || null
 		},
 		{ immediate: true }