mirror of
				https://github.com/Gongxh0901/kunpolibrary
				synced 2025-10-31 11:25:46 +00:00 
			
		
		
		
	demo中添加不同fgui包中的同名组件测试
This commit is contained in:
		
							
								
								
									
										19
									
								
								demo/assets/script/UI/Window/Item1.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								demo/assets/script/UI/Window/Item1.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| /** | ||||
|  * @Author: Gongxh | ||||
|  * @Date: 2025-09-04 | ||||
|  * @Description:  | ||||
|  */ | ||||
| import { fgui, kunpo } from "../../header"; | ||||
|  | ||||
| const { uiheader, uiprop, uicom, uiclick } = kunpo._uidecorator; | ||||
| const { bindMethod, bindProp } = kunpo.data; | ||||
|  | ||||
| @uicom("Window", "Item1") | ||||
| export class Item1 extends fgui.GComponent { | ||||
|     @uiprop | ||||
|     private lab_desc: fgui.GTextField; | ||||
|  | ||||
|     public onInit(): void { | ||||
|         console.log("Window Item1 onInit", this.lab_desc); | ||||
|     } | ||||
| } | ||||
							
								
								
									
										9
									
								
								demo/assets/script/UI/Window/Item1.ts.meta
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								demo/assets/script/UI/Window/Item1.ts.meta
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| { | ||||
|   "ver": "4.0.24", | ||||
|   "importer": "typescript", | ||||
|   "imported": true, | ||||
|   "uuid": "1ff847fb-6a86-4fce-9c97-4483771c6a67", | ||||
|   "files": [], | ||||
|   "subMetas": {}, | ||||
|   "userData": {} | ||||
| } | ||||
							
								
								
									
										22
									
								
								demo/assets/script/UI/Window/SameItemWindow.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								demo/assets/script/UI/Window/SameItemWindow.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,22 @@ | ||||
| /** | ||||
|  * @Author: Gongxh | ||||
|  * @Date: 2025-09-04 | ||||
|  * @Description:  | ||||
|  */ | ||||
|  | ||||
|  | ||||
| import { kunpo } from "../../header"; | ||||
| const { uiclass, uiprop, uiclick } = kunpo._uidecorator; | ||||
|  | ||||
| @uiclass("Window", "Window", "SameItemWindow") | ||||
| export class SameItemWindow extends kunpo.Window { | ||||
|     protected onInit(): void { | ||||
|         this.adapterType = kunpo.AdapterType.Bang; | ||||
|         this.type = kunpo.WindowType.HideOne; | ||||
|     } | ||||
|  | ||||
|     @uiclick | ||||
|     private onClickBtnClose(): void { | ||||
|         kunpo.WindowManager.closeWindow(this.name); | ||||
|     } | ||||
| } | ||||
							
								
								
									
										9
									
								
								demo/assets/script/UI/Window/SameItemWindow.ts.meta
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								demo/assets/script/UI/Window/SameItemWindow.ts.meta
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| { | ||||
|   "ver": "4.0.24", | ||||
|   "importer": "typescript", | ||||
|   "imported": true, | ||||
|   "uuid": "1df418c4-04d7-4bd7-9125-36e070d091ff", | ||||
|   "files": [], | ||||
|   "subMetas": {}, | ||||
|   "userData": {} | ||||
| } | ||||
| @@ -82,6 +82,11 @@ export class UIBaseWindow extends kunpo.Window { | ||||
|         kunpo.WindowManager.showWindow("HideAllWindow"); | ||||
|     } | ||||
|  | ||||
|     @uiclick | ||||
|     private onClickSameItem(): void { | ||||
|         kunpo.WindowManager.showWindow("SameItemWindow"); | ||||
|     } | ||||
|  | ||||
|     public getHeaderInfo(): kunpo.WindowHeaderInfo { | ||||
|         return kunpo.WindowHeaderInfo.create("WindowHeader", "aaa"); | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user