style: prettify code

This commit is contained in:
yanglbme 2021-10-14 12:12:46 +00:00 committed by GitHub Action
parent 6e8763ff75
commit 6774cceb06
2 changed files with 4 additions and 8 deletions

View File

@ -240,11 +240,11 @@ export function downloadMD(doc) {
* @param {HTML生成内容} htmlStr * @param {HTML生成内容} htmlStr
*/ */
export function exportHTML(htmlStr) { export function exportHTML(htmlStr) {
const downLink = document.createElement('a') const downLink = document.createElement("a");
downLink.download = 'content.html'; downLink.download = "content.html";
downLink.style.display = "none"; downLink.style.display = "none";
let blob = new Blob([`<html><body>${htmlStr}</body></html>`]) let blob = new Blob([`<html><body>${htmlStr}</body></html>`]);
downLink.href = URL.createObjectURL(blob); downLink.href = URL.createObjectURL(blob);
document.body.appendChild(downLink); document.body.appendChild(downLink);

View File

@ -29,11 +29,7 @@
content="导出 HTML" content="导出 HTML"
placement="bottom-start" placement="bottom-start"
> >
<i <i class="el-icon-document" size="medium" @click="$emit('export')"></i>
class="el-icon-document"
size="medium"
@click="$emit('export')"
></i>
</el-tooltip> </el-tooltip>
<!-- 页面重置 --> <!-- 页面重置 -->
<el-tooltip <el-tooltip