424
This commit is contained in:
@@ -9,12 +9,13 @@ export function useEchart() {
|
||||
const initChart = () => {
|
||||
const dom = document.getElementById(id.value)
|
||||
chart = echarts.init(dom)
|
||||
chartVal.value = chart
|
||||
}
|
||||
const setOption = (params, update = false) => {
|
||||
initChart()
|
||||
chart.setOption(params, update)
|
||||
}
|
||||
const clearOption = () => {
|
||||
console.log('clearooooooooooooooooo')
|
||||
// 将series设置为空数组,可以清空图表内容
|
||||
chart.setOption({
|
||||
series:[]
|
||||
|
||||
Reference in New Issue
Block a user