Procházet zdrojové kódy

feat: 兼容触发器问题

luoyali před 3 měsíci
rodič
revize
a31f7607c4
1 změnil soubory, kde provedl 10 přidání a 0 odebrání
  1. 10 0
      src/components/scWorkflow/nodes/trigger.vue

+ 10 - 0
src/components/scWorkflow/nodes/trigger.vue

@@ -152,6 +152,16 @@ export default {
 	mounted() {
 		this.nodeConfig = this.modelValue
 		const { delayType, triggerType } = this.nodeConfig
+
+		// 检查 extendConfig 是否存在,如果不存在则初始化
+		if (!this.nodeConfig.hasOwnProperty('extendConfig')) {
+			this.nodeConfig.extendConfig = {
+				time: '', // 立即执行 time不用设置
+				args: '',
+				trigger: ''
+			}
+			return
+		}
 		if (triggerType === '1') return
 		const extendConfig = this.nodeConfig?.extendConfig?.time.split(':')
 		if (delayType === '1') {