diff --git a/src/views/markdown/index.vue b/src/views/markdown/index.vue index f8d826b..5d21d3b 100644 --- a/src/views/markdown/index.vue +++ b/src/views/markdown/index.vue @@ -3,11 +3,11 @@ 确 定 - +
文章标题: - + 选择位置 发布文章 @@ -25,6 +25,7 @@ @save="save" @imgAdd="$imgAdd" @imgDel="$imgDel" + @fullScreen="fullScreen" />
@@ -44,9 +45,10 @@ content:"", // 输入的markdown html:'', // 及时转的html filename: '新建文档', - clientHeight: document.documentElement.clientHeight - 155, + clientHeight: document.documentElement.clientHeight - 135, updating: false, adding: false, + isFullScreen: false, storageLocation: '/', selectLocationVisible: false, } @@ -64,7 +66,7 @@ } const that = this window.onresize = function temp() { - that.clientHeight = document.documentElement.clientHeight - 155 + that.reHeight() } }, methods: { @@ -104,6 +106,17 @@ // render 为 markdown 解析后的结果[html] this.html = render; }, + fullScreen(status) { + this.isFullScreen = status + this.reHeight() + }, + reHeight(){ + if(this.isFullScreen){ + this.clientHeight = document.documentElement.clientHeight + }else{ + this.clientHeight = document.documentElement.clientHeight - 135 + } + }, save(){ if(this.editStatus){ this.update() @@ -173,9 +186,12 @@