显示效果全面优化
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<VChart :option="option" />
|
||||
<VChart id="myWaterLevel" :option="option" />
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { reactive } from "vue";
|
||||
import { reactive, onMounted } from "vue";
|
||||
import { use } from "echarts/core";
|
||||
import { CanvasRenderer } from "echarts/renderers";
|
||||
import { TitleComponent } from "echarts/components";
|
||||
@@ -16,6 +16,11 @@ use([
|
||||
TitleComponent
|
||||
]);
|
||||
|
||||
onMounted(() => {
|
||||
var mychart = document.getElementById("myWaterLevel");
|
||||
mychart.firstChild.style.margin = "auto";
|
||||
});
|
||||
|
||||
|
||||
const option = reactive({
|
||||
title: {
|
||||
|
||||
Reference in New Issue
Block a user