mirror of
				https://github.com/pure-admin/vue-pure-admin.git
				synced 2025-11-03 13:44:47 +08:00 
			
		
		
		
	fix: echart not render in production
This commit is contained in:
		
							parent
							
								
									57ee746489
								
							
						
					
					
						commit
						68330026b6
					
				@ -31,7 +31,7 @@ import flop from "../components/flop/index.vue";
 | 
				
			|||||||
import { ref, computed, onMounted, inject, nextTick } from "vue";
 | 
					import { ref, computed, onMounted, inject, nextTick } from "vue";
 | 
				
			||||||
import { deviceDetection } from "../utils/deviceDetection";
 | 
					import { deviceDetection } from "../utils/deviceDetection";
 | 
				
			||||||
import { echartsJson } from "../api/mock";
 | 
					import { echartsJson } from "../api/mock";
 | 
				
			||||||
import { useEventListener } from "@vueuse/core";
 | 
					import { useEventListener, tryOnUnmounted } from "@vueuse/core";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
let brokenLine: any = null; //折线图实例
 | 
					let brokenLine: any = null; //折线图实例
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
@ -188,6 +188,12 @@ export default {
 | 
				
			|||||||
      });
 | 
					      });
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    tryOnUnmounted(() => {
 | 
				
			||||||
 | 
					      if (!brokenLine) return;
 | 
				
			||||||
 | 
					      brokenLine.dispose();
 | 
				
			||||||
 | 
					      brokenLine = null;
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      greetings,
 | 
					      greetings,
 | 
				
			||||||
      mobile,
 | 
					      mobile,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user