未验证 提交 14c1b959 编写于 作者: P pnck 提交者: GitHub

update: update echarts version to 5.x (#1047)

上级 4dbe5ffa
......@@ -13,7 +13,7 @@
"@element-plus/icons-vue": "^0.2.7",
"axios": "^0.19.2",
"core-js": "^3.6.5",
"echarts": "4.9.0",
"echarts": "5.3.2",
"element-plus": "2.0.1",
"highlight.js": "^10.6.0",
"marked": "^2.0.0",
......
......@@ -11,8 +11,8 @@
</template>
<script setup>
import * as echarts from 'echarts'
import { nextTick, onMounted, onUnmounted, ref } from 'vue'
import 'echarts/theme/macarons'
import { nextTick, onMounted, onUnmounted, ref , shallowRef } from 'vue'
// import 'echarts/theme/macarons'
var dataAxis = []
for (var i = 1; i < 13; i++) {
......@@ -40,10 +40,10 @@ for (var i = 0; i < data.length; i++) {
dataShadow.push(yMax)
}
const chart = ref(null)
const chart = shallowRef(null)
const echart = ref(null)
const initChart = () => {
chart.value = echarts.init(echart.value, 'macarons')
chart.value = echarts.init(echart.value, /*'macarons'*/)
setOptions()
}
const setOptions = () => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册