mirror of
				https://github.com/vform666/variant-form3-vite.git
				synced 2025-10-31 08:41:49 +08:00 
			
		
		
		
	修复getFieldValue()方法没有返回的问题。
This commit is contained in:
		| @@ -484,7 +484,19 @@ | ||||
|       getFieldValue(fieldName) { //单个字段获取值 | ||||
|         let fieldRef = this.getWidgetRef(fieldName) | ||||
|         if (!!fieldRef && !!fieldRef.getValue) { | ||||
|           fieldRef.getValue() | ||||
|           return fieldRef.getValue() | ||||
|         } | ||||
|  | ||||
|         if (!fieldRef) { //如果是子表单字段 | ||||
|           let result = [] | ||||
|           this.findWidgetNameInSubForm(fieldName).forEach(wn => { | ||||
|             let sw = this.getWidgetRef(wn) | ||||
|             if (!!sw && !!sw.getValue) { | ||||
|               result.push( sw.getValue() ) | ||||
|             } | ||||
|           }) | ||||
|  | ||||
|           return result | ||||
|         } | ||||
|       }, | ||||
|  | ||||
| @@ -493,6 +505,15 @@ | ||||
|         if (!!fieldRef && !!fieldRef.setValue) { | ||||
|           fieldRef.setValue(fieldValue) | ||||
|         } | ||||
|  | ||||
|         if (!fieldRef) { //如果是子表单字段 | ||||
|           this.findWidgetNameInSubForm(fieldName).forEach(wn => { | ||||
|             let sw = this.getWidgetRef(wn) | ||||
|             if (!!sw && !!sw.setValue) { | ||||
|               sw.setValue(fieldValue) | ||||
|             } | ||||
|           }) | ||||
|         } | ||||
|       }, | ||||
|  | ||||
|       getSubFormValues(subFormName, needValidation = true) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user