<div
    id="back"
    @mousedown="draggableFun($event)"
  >
// 返回按钮点击事件
const goBack = () => {
  store.showDetail = false;
};
// 鼠标拖拽事件
const draggableFun = (val) => {
  let div = document.getElementById("back");
  let dragFlag = false;
  let x, y;

  div.onmousedown = function (e) {
    dragFlag = true;
    e = e || window.event;
    // 获取鼠标在元素上的位置(鼠标按下时在元素上得位置)
    x = e.clientX - div.offsetLeft;
    y = e.clientY - div.offsetTop;
    
  };

  div.onmousemove = function (e) {
    if (dragFlag) {
      e = e || window.event;
      div.style.left = e.clientX - x + "px";
      div.style.top = e.clientY - y + "px";
    }
  };
  // 鼠标抬起事件
  div.onmouseup = function (e) {
    dragFlag = false;
  };
};