用confine: true,解决
let option = {
legend: {
top: "0%",
left: "center",
itemWidth: 20,
itemHeight: 8,
textStyle: {
color: "#c0c3cd",
fontSize: 13,
padding: [2, 0, 0, 0],
},
},
tooltip: {
trigger: "axis",
confine: true,
axisPointer: {
type: "shadow",
},
},