Browse Source

fix: 流程创建切换 未标记 重复更新 问题

lanceJiang 6 months ago
parent
commit
7827bd28bf
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/views/flow/create/index.vue

+ 4 - 0
src/views/flow/create/index.vue

@@ -171,6 +171,7 @@ const activeComponent = index => {
 		}
 		// 当前缓存
 		if (!cache_components.value[index]) {
+			cache_components.value[index] = true
 			// 更新数据
 			const updateCompInfo = compRefs.value[index]?.updateCompInfo
 			// console.error('刷新数据')
@@ -223,6 +224,7 @@ const getCurrentProcessDetailEv = async () => {
 					for (let i = 0; i < _refs.length; i++) {
 						const updateCompInfo = compRefs.value[i]?.updateCompInfo
 						if (updateCompInfo) {
+							cache_components.value[i] = true
 							updateCompInfo()
 						}
 					}
@@ -231,12 +233,14 @@ const getCurrentProcessDetailEv = async () => {
 					loading.value = false
 				})
 		} else {
+			cache_components.value = {}
 			nextTick(() => {
 				// 默认执行一次保存
 				const _refs = compRefs.value
 				for (let i = 0; i < _refs.length; i++) {
 					const updateCompInfo = compRefs.value[i]?.updateCompInfo
 					if (updateCompInfo) {
+						cache_components.value[i] = true
 						updateCompInfo()
 					}
 				}