在onMounted 里面写监听事件 onMounted(()=>{ window.addEventListener('resize', function () {//执行 chart.resize(); }) })