function drawLine(startObj, endObj) {
//startObj传入的开始dom,endObj结束Dom
const y_start = startObj.offsetTop + startObj.offsetHeight / 2;
const x_start = startObj.offsetLeft + startObj.offsetWidth / 2;
const y_end = endObj.offsetTop + endObj.offsetHeight / 2;
const x_end = endObj.offsetLeft + endObj.offsetWidth / 2;
const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
svg.setAttribute("width", "100%");
svg.setAttribute("height", "100%");
svg.style.position = "absolute";
svg.style.top = "0";
svg.style.left = "0";
svg.style.zIndex = "1";
const arrow = document.createElementNS("http://www.w3.org/2000/svg", "line");
arrow.setAttribute("x1", x_start);
arrow.setAttribute("y1", y_start);
arrow.setAttribute("x2", x_end);
arrow.setAttribute("y2", y_end);
arrow.setAttribute("stroke", "green");//箭头的颜色
arrow.setAttribute("stroke-width", "2");
arrow.setAttribute("marker-end", "url(#arrowhead)");
const