mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-06 16:37:18 +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 { deviceDetection } from "../utils/deviceDetection";
|
||||
import { echartsJson } from "../api/mock";
|
||||
import { useEventListener } from "@vueuse/core";
|
||||
import { useEventListener, tryOnUnmounted } from "@vueuse/core";
|
||||
|
||||
let brokenLine: any = null; //折线图实例
|
||||
export default {
|
||||
@ -188,6 +188,12 @@ export default {
|
||||
});
|
||||
});
|
||||
|
||||
tryOnUnmounted(() => {
|
||||
if (!brokenLine) return;
|
||||
brokenLine.dispose();
|
||||
brokenLine = null;
|
||||
});
|
||||
|
||||
return {
|
||||
greetings,
|
||||
mobile,
|
||||
|
Loading…
x
Reference in New Issue
Block a user