mirror of
				https://github.com/vform666/variant-form3-vite.git
				synced 2025-10-31 16:51:49 +08:00 
			
		
		
		
	补充遗漏的refMixinDesign.js文件。
This commit is contained in:
		
							
								
								
									
										28
									
								
								src/components/form-designer/refMixinDesign.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								src/components/form-designer/refMixinDesign.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,28 @@ | ||||
| export default { | ||||
|   methods: { | ||||
|     initRefList() { | ||||
|       if ((this.refList !== null) && !!this.widget.options.name) { | ||||
|         this.refList[this.widget.options.name] = this | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     getWidgetRef(widgetName, showError) { | ||||
|       let foundRef = this.refList[widgetName] | ||||
|       if (!foundRef && !!showError) { | ||||
|         this.$message.error(this.i18nt('render.hint.refNotFound') + widgetName) | ||||
|       } | ||||
|       return foundRef | ||||
|     }, | ||||
|  | ||||
|     /* 该方法用于组件重名检查!! */ | ||||
|     registerToRefList(oldRefName) { | ||||
|       if ((this.refList !== null) && !!this.widget.options.name) { | ||||
|         if (!!oldRefName) { | ||||
|           delete this.refList[oldRefName] | ||||
|         } | ||||
|         this.refList[this.widget.options.name] = this | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|   } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user