简单方法:清除echarts实例dom上的 _echarts_instance_ 属性
<script setup>
import { ref, nextTick, onMounted } from 'vue'
import * as echarts from 'echarts'
onMounted(async () => {
await nextTick(() => {})
const chartDom = document.querySelector('.my-echart')
chartDom.removeAttribute('_echarts_instance_')
const myChart = echarts.init(rb_dom)
})
</script>