mirror of
https://github.com/doocs/md.git
synced 2024-11-24 19:10:34 +08:00
style: prettify code
This commit is contained in:
parent
6e8763ff75
commit
6774cceb06
@ -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);
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user