init:初始化

master
HuangHuiKang 1 week ago
parent f94549fdff
commit 8ffba0705c

@ -24,6 +24,7 @@ import { GridComponent, TooltipComponent, LegendComponent } from "echarts/compon
import { CanvasRenderer } from "echarts/renderers"; import { CanvasRenderer } from "echarts/renderers";
import { useResizeObserver } from "@vueuse/core"; import { useResizeObserver } from "@vueuse/core";
import { nextTick, onBeforeUnmount, onMounted, ref, watch } from "vue";
defineOptions({ name: "FaECharts" }); defineOptions({ name: "FaECharts" });
@ -71,7 +72,7 @@ useResizeObserver(chartRef, () => {
// options // options
watch( watch(
() => props.options, () => props.options,
(newOptions) => { (newOptions: echarts.EChartsCoreOption) => {
if (chartInstance && newOptions) { if (chartInstance && newOptions) {
chartInstance.setOption(newOptions); chartInstance.setOption(newOptions);
} }

@ -204,7 +204,7 @@ defineOptions({
inheritAttrs: false, inheritAttrs: false,
}); });
import { h } from "vue"; import { h, nextTick } from "vue";
import { UserFilled } from "@element-plus/icons-vue"; import { UserFilled } from "@element-plus/icons-vue";
import { ElAvatar } from "element-plus"; import { ElAvatar } from "element-plus";
import { ResultEnum } from "@/enums/api/result.enum"; import { ResultEnum } from "@/enums/api/result.enum";

Loading…
Cancel
Save