mirror of
https://github.com/doocs/md.git
synced 2024-10-31 00:07:50 +08:00
style: resolve lint warning
This commit is contained in:
parent
3eb06bf852
commit
8b9929f7db
@ -213,7 +213,7 @@ export function fixCodeWhiteSpace(value = "pre") {
|
||||
* 下载原始 Markdown 文档
|
||||
* @param {文档内容} doc
|
||||
*/
|
||||
export function downLoadMD(doc) {
|
||||
export function downloadMD(doc) {
|
||||
let downLink = document.createElement("a");
|
||||
|
||||
downLink.download = "content.md";
|
||||
|
@ -9,20 +9,20 @@
|
||||
<i
|
||||
class="el-icon-upload"
|
||||
size="medium"
|
||||
@click="$emit('showDialogUploadImg')"
|
||||
@click="$emit('show-dialog-upload-img')"
|
||||
></i>
|
||||
</el-tooltip>
|
||||
<!-- 下载文本文档 -->
|
||||
<el-tooltip
|
||||
class="header__item"
|
||||
:effect="effect"
|
||||
content="下载编辑框Markdown文档"
|
||||
content="下载 Markdown 文档"
|
||||
placement="bottom-start"
|
||||
>
|
||||
<i
|
||||
class="el-icon-download"
|
||||
size="medium"
|
||||
@click="$emit('downLoad')"
|
||||
@click="$emit('download')"
|
||||
></i>
|
||||
</el-tooltip>
|
||||
<!-- 页面重置 -->
|
||||
@ -160,7 +160,7 @@
|
||||
plain
|
||||
size="medium"
|
||||
class="about"
|
||||
@click="$emit('showAboutDialog')"
|
||||
@click="$emit('show-about-dialog')"
|
||||
>关于</el-button
|
||||
>
|
||||
<el-tooltip
|
||||
@ -185,7 +185,7 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
downLoadMD,
|
||||
downloadMD,
|
||||
setFontSize,
|
||||
fixCodeWhiteSpace,
|
||||
setColorWithCustomTemplate,
|
||||
@ -327,7 +327,7 @@ export default {
|
||||
this.citeStatus = false;
|
||||
this.statusChanged(false);
|
||||
this.fontChanged(this.config.builtinFonts[0].value);
|
||||
this.colorChanged(this.config.colorOption[1].value);
|
||||
this.colorChanged(this.config.colorOption[0].value);
|
||||
this.sizeChanged(this.config.sizeOption[2].value);
|
||||
this.$emit("cssChanged");
|
||||
this.selectFont = this.currentFont;
|
||||
|
@ -54,8 +54,8 @@ export default {
|
||||
],
|
||||
[
|
||||
{
|
||||
text: "下载MD文档",
|
||||
key: "downLoad",
|
||||
text: "下载 Markdown 文档",
|
||||
key: "download",
|
||||
},
|
||||
],
|
||||
],
|
||||
|
@ -65,7 +65,7 @@ const mutations = {
|
||||
state.currentFont =
|
||||
localStorage.getItem("fonts") || config.builtinFonts[0].value;
|
||||
state.currentColor =
|
||||
localStorage.getItem("color") || config.colorOption[1].value;
|
||||
localStorage.getItem("color") || config.colorOption[0].value;
|
||||
state.currentSize =
|
||||
localStorage.getItem("size") || config.sizeOption[2].value;
|
||||
state.codeTheme =
|
||||
|
@ -6,11 +6,11 @@
|
||||
ref="header"
|
||||
@refresh="onEditorRefresh"
|
||||
@cssChanged="cssChanged"
|
||||
@downLoad="downloadEditorContent"
|
||||
@download="downloadEditorContent"
|
||||
@showCssEditor="showCssEditor = !showCssEditor"
|
||||
@showAboutDialog="aboutDialogVisible = true"
|
||||
@show-about-dialog="aboutDialogVisible = true"
|
||||
@showDialogForm="dialogFormVisible = true"
|
||||
@showDialogUploadImg="dialogUploadImgVisible = true"
|
||||
@show-dialog-upload-img="dialogUploadImgVisible = true"
|
||||
@startCopy="(isCoping = true), (backLight = true)"
|
||||
@endCopy="endCopy"
|
||||
/>
|
||||
@ -95,7 +95,8 @@ import uploadImgDialog from "../components/CodemirrorEditor/uploadImgDialog";
|
||||
|
||||
import {
|
||||
css2json,
|
||||
downLoadMD,
|
||||
downloadMD,
|
||||
formatDoc,
|
||||
setFontSize,
|
||||
saveEditorContent,
|
||||
customCssWithTemplate,
|
||||
@ -336,7 +337,7 @@ export default {
|
||||
},
|
||||
// 下载编辑器内容到本地
|
||||
downloadEditorContent() {
|
||||
downLoadMD(this.editor.getValue(0));
|
||||
downloadMD(this.editor.getValue(0));
|
||||
},
|
||||
// 右键菜单
|
||||
openMenu(e) {
|
||||
@ -360,7 +361,7 @@ export default {
|
||||
case "insertPic":
|
||||
this.dialogUploadImgVisible = true;
|
||||
break;
|
||||
case "downLoad":
|
||||
case "download":
|
||||
this.downloadEditorContent();
|
||||
break;
|
||||
case "insertTable":
|
||||
|
Loading…
Reference in New Issue
Block a user