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