mirror of
				https://github.com/vform666/variant-form3-vite.git
				synced 2025-10-31 08:41:49 +08:00 
			
		
		
		
	给onValidate交互事件绑定this对象。
This commit is contained in:
		| @@ -233,7 +233,10 @@ export default { | ||||
|       } | ||||
|  | ||||
|       if (!!this.field.options.onValidate) { | ||||
|         let customFn = new Function('rule', 'value', 'callback', this.field.options.onValidate) | ||||
|         let customFn = (rule, value, callback) => { | ||||
|           let tmpFunc =  new Function('rule', 'value', 'callback', this.field.options.onValidate) | ||||
|           return tmpFunc.call(this, rule, value, callback) | ||||
|         } | ||||
|         this.rules.push({ | ||||
|           validator: customFn, | ||||
|           trigger: ['blur', 'change'], | ||||
|   | ||||
		Reference in New Issue
	
	Block a user