vue下载模板 (导出)
2022-08-03 09:57:03
263
{{single.collect_count}}
 <el-button size="mini"><svg-iconicon-class="Icon-Save"style="border: 1px dashed #afb0b2;width: 14px;height: 14px;margin-right: 8px;"></svg-icon><span @click="downLoad">下载模板</span></el-button>
// 下载模板downLoad() {// 调用接口直接下载getPeopleInfo().then((resp) => {// console.log(response);const link = document.createElement("a");const blob = new Blob([resp], {type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",});link.style.display = "none";link.href = URL.createObjectURL(blob);link.setAttribute("download", decodeURI("下载模板.xls"));document.body.appendChild(link);link.click();document.body.removeChild(link);this.exportLoading = false;// 关闭加载状态}).catch(() => {// 关闭加载状态// this.tableLoading = false;});},
回帖
全部回帖({{commentCount}})
{{item.user.nickname}} {{item.user.group_title}} {{item.friend_time}}
{{item.content}}
{{item.comment_content_show ? '取消' : '回复'}} 删除
回帖
{{reply.user.nickname}} {{reply.user.group_title}} {{reply.friend_time}}
{{reply.content}}
{{reply.comment_content_show ? '取消' : '回复'}} 删除
回帖
收起
没有更多啦~
{{commentLoading ? '加载中...' : '查看更多评论'}}