mirror of https://github.com/alibaba/ice.git
				
				
				
			Fix/style not match (#6521)
* fix: fix style not match when hydrate * chore: add changeset
This commit is contained in:
		
							parent
							
								
									b748810588
								
							
						
					
					
						commit
						a04cc00242
					
				|  | @ -0,0 +1,5 @@ | |||
| --- | ||||
| '@ice/cache-canvas': patch | ||||
| --- | ||||
| 
 | ||||
| fix: fix style not match when hydrate | ||||
|  | @ -119,10 +119,9 @@ export const CacheCanvas = forwardRef((props: CacheCanvasProps, ref) => { | |||
|           { | ||||
|             (typeof fallback === 'function') && (<div | ||||
|               id={`fallback-${id}`} | ||||
|               style={isNode || Storage.getItem(cacheKey, { bizID }) ? { display: 'none' } : { display: 'block' }} | ||||
|             > | ||||
|               { | ||||
|                 fallback() | ||||
|                 (isNode || !Storage.getItem(cacheKey, { bizID })) && fallback() | ||||
|               } | ||||
|             </div>) | ||||
|           } | ||||
|  | @ -155,9 +154,9 @@ export const CacheCanvas = forwardRef((props: CacheCanvasProps, ref) => { | |||
|                   if (base64Data) { | ||||
|                     const img = document.getElementById('canvas-img-${id}'); | ||||
|                     img && (img.src = base64Data); | ||||
|                     fallback && (fallback.style.display = 'none'); | ||||
|                   } else { | ||||
|                     fallback && (fallback.style.display = 'block'); | ||||
|                     if (fallback && fallback.childNodes[0]) { | ||||
|                       fallback.removeChild(fallback.childNodes[0]); | ||||
|                     } | ||||
|                   } | ||||
|                 `,
 | ||||
|               }} | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue