File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 11<template >
2- <div id =" mp-luogu-markdown-editor" class =" mp-editor-container" :class =" {'mp-full-screen': this.config. fullScreen}" >
2+ <div id =" mp-luogu-markdown-editor" class =" mp-editor-container" :class =" {'mp-full-screen': this.fullScreen}" >
33 <div id =" mp-editor-toolbar" class =" mp-editor-toolbar" >
44 <toolbar @change =" insert" @click =" clickToolbar" @input =" handleToolbarOperation"
55 :toolbarConfig =" editorConfig.toolbarConfig" ref =" toolbar" ></toolbar >
@@ -112,6 +112,7 @@ export default {
112112 insertCode: null ,
113113 editorConfig: config,
114114 editorHeight: ' 500px' ,
115+ fullScreen: config .fullScreen ,
115116 contentParser: contentParserFactory (config .parsers )
116117 }
117118 },
@@ -146,6 +147,18 @@ export default {
146147 }
147148 this .dialogRequest = request
148149 this .showDialog = true
150+ },
151+ handleToolbarOperation (operation ) {
152+ if (operation === ' hide' ) {
153+ if (this .config .previewDisplay === ' normal' ) { this .config .previewDisplay = ' hide' } else { this .config .previewDisplay = ' normal' }
154+ }
155+ if (operation === ' fullScreen' ) {
156+ if (! this .fullScreen ) {
157+ this .fullScreen = true
158+ } else {
159+ this .fullScreen = false
160+ }
161+ }
149162 }
150163 },
151164 watch: {
You can’t perform that action at this time.
0 commit comments