在线监测点修改
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div ref="chartRef" class="my-chart" />
|
||||
<div ref='chartRef' class='my-chart' />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
<script setup lang='ts'>
|
||||
import { onBeforeUnmount, onMounted, ref, defineExpose, watch } from 'vue'
|
||||
// import echarts from './echarts'
|
||||
import * as echarts from 'echarts' // 全引入
|
||||
@@ -71,7 +71,7 @@ const initChart = () => {
|
||||
top: '50px',
|
||||
left: '10px',
|
||||
right: '60px',
|
||||
bottom: '40px',
|
||||
bottom: props.options.options?.dataZoom === null ? '10px' : '40px',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: handlerXAxis(),
|
||||
@@ -172,8 +172,8 @@ const handlerXAxis = () => {
|
||||
if (Array.isArray(props.options.xAxis)) {
|
||||
return props.options.xAxis.map((item: any) => {
|
||||
return {
|
||||
...item,
|
||||
...temp
|
||||
...temp,
|
||||
...item
|
||||
}
|
||||
})
|
||||
} else {
|
||||
@@ -200,7 +200,7 @@ watch(
|
||||
)
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
<style lang='scss' scoped>
|
||||
.my-chart {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
Reference in New Issue
Block a user