导出模板copy

import { ElMessage, ElMessageBox } from "element-plus";

先引入   

 ElMessageBox.confirm("是否确认下载所有数据?", "提示", {

    confirmButtonText: "确定",

    cancelButtonText: "取消",

    type: "warning",

  })

    .then(async () => {

      proxy.download(

      "/prod-control/network/export",

      {

        ...queryParams.value,

      },

      `水网导出.xlsx`

    );

    })

    .catch(() => {

      ElMessage({

        type: "info",

        message: "下载失败",

      });

    });

猜你喜欢

转载自blog.csdn.net/weixin_47194802/article/details/132235297