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