mirror of
				https://github.com/Tencent/tmagic-editor.git
				synced 2025-10-30 11:53:31 +08:00 
			
		
		
		
	feat(stage,runtime): 去掉runtime getSnapElements 定义
This commit is contained in:
		
							parent
							
								
									f18e7b275d
								
							
						
					
					
						commit
						e5f0506a00
					
				| @ -112,7 +112,6 @@ export interface RemoveData { | |||||||
| export interface Runtime { | export interface Runtime { | ||||||
|   getApp?: () => Core; |   getApp?: () => Core; | ||||||
|   beforeSelect?: (el: HTMLElement) => Promise<boolean> | boolean; |   beforeSelect?: (el: HTMLElement) => Promise<boolean> | boolean; | ||||||
|   getSnapElements?: (el?: HTMLElement) => HTMLElement[]; |  | ||||||
|   updateRootConfig?: (config: MApp) => void; |   updateRootConfig?: (config: MApp) => void; | ||||||
|   updatePageId?: (id: Id) => void; |   updatePageId?: (id: Id) => void; | ||||||
|   select?: (id: Id) => Promise<HTMLElement> | HTMLElement; |   select?: (id: Id) => Promise<HTMLElement> | HTMLElement; | ||||||
|  | |||||||
| @ -56,10 +56,6 @@ export default defineComponent({ | |||||||
|         app?.setPage(id); |         app?.setPage(id); | ||||||
|       }, |       }, | ||||||
| 
 | 
 | ||||||
|       getSnapElements() { |  | ||||||
|         return Array.from(document.querySelectorAll<HTMLElement>('[class*=magic-ui][id]')); |  | ||||||
|       }, |  | ||||||
| 
 |  | ||||||
|       select(id: Id) { |       select(id: Id) { | ||||||
|         console.log('select config', id); |         console.log('select config', id); | ||||||
|         selectedId.value = id; |         selectedId.value = id; | ||||||
|  | |||||||
| @ -56,10 +56,6 @@ export default defineComponent({ | |||||||
|         app?.setPage(id); |         app?.setPage(id); | ||||||
|       }, |       }, | ||||||
| 
 | 
 | ||||||
|       getSnapElements() { |  | ||||||
|         return Array.from(document.querySelectorAll<HTMLElement>('[class*=magic-ui][id]')); |  | ||||||
|       }, |  | ||||||
| 
 |  | ||||||
|       select(id: Id) { |       select(id: Id) { | ||||||
|         console.log('select config', id); |         console.log('select config', id); | ||||||
|         selectedId.value = id; |         selectedId.value = id; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user