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