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 1
1
<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}" >
3
3
<div id =" mp-editor-toolbar" class =" mp-editor-toolbar" >
4
4
<toolbar @change =" insert" @click =" clickToolbar" @input =" handleToolbarOperation"
5
5
:toolbarConfig =" editorConfig.toolbarConfig" ref =" toolbar" ></toolbar >
@@ -112,6 +112,7 @@ export default {
112
112
insertCode: null ,
113
113
editorConfig: config,
114
114
editorHeight: ' 500px' ,
115
+ fullScreen: config .fullScreen ,
115
116
contentParser: contentParserFactory (config .parsers )
116
117
}
117
118
},
@@ -146,6 +147,18 @@ export default {
146
147
}
147
148
this .dialogRequest = request
148
149
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
+ }
149
162
}
150
163
},
151
164
watch: {
You can’t perform that action at this time.
0 commit comments