mirror of
				https://github.com/soybeanjs/soybean-admin.git
				synced 2025-11-04 15:53:43 +08:00 
			
		
		
		
	Update echarts.ts
fix:cannot re-render if dom is deleted If the chart is opened in the pop-up window, opening the chart again will not display properly.
This commit is contained in:
		@@ -130,6 +130,10 @@ export function useEcharts(
 | 
			
		||||
  const stopSizeWatch = watch([width, height], ([newWidth, newHeight]) => {
 | 
			
		||||
    initialSize.width = newWidth;
 | 
			
		||||
    initialSize.height = newHeight;
 | 
			
		||||
		if (newWidth === 0 && newHeight === 0) {
 | 
			
		||||
      // 节点被删除 将chart置为空
 | 
			
		||||
      chart = null
 | 
			
		||||
    }
 | 
			
		||||
    if (canRender()) {
 | 
			
		||||
      if (!isRendered()) {
 | 
			
		||||
        render();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user