File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 3333 <div class =" ArticleTitle" >
3434 <input placeholder =" 文章缩略图" @change =" SetArticleCover" type =" file" multiple =" multiple" ref =' selectfile' >
3535 </div >
36- <img :src =" ArticleCover" v-show =" ArticleCover" style =" width : 150 px ;height : 100 px " >
36+ <img :src =" ArticleCover" v-show =" ArticleCover" style =" width : 70 px ;height : 40 px " >
3737 <div class =" WriteSubmit" >
3838 <el-button type =" primary" @click =" SubmitArticle()" >确认</el-button >
3939 </div >
4040 </div >
4141
4242 <div class =" ArticleDetail" id =" ArticleDetail" >
43- <mavon-editor v-model =" Content" :isHljs = " true" @imgAdd =" $imgAdd" ref =md ></mavon-editor >
43+ <mavon-editor v-model =" Content" :isHljs = " true" @imgAdd =" $imgAdd" ref =md :style = " {height: editorHeight} " ></mavon-editor >
4444 </div >
4545 </div >
4646 </div >
7171 ArticleTagOptions: [],
7272 ArticleTag: ' ' ,
7373 ArticleCover: ' ' ,
74- CommentNum: 0
74+ CommentNum: 0 ,
75+ editorHeight: 0
7576 }
7677 },
7778 methods: {
183184 }else {
184185
185186 }
187+
188+ // 根据分辨率,动态设置编辑器高度
189+ That .editorHeight = window .screen .height - 375 + ' px' ;
186190 },
187191 components: {
188192 TopBar: TopBar
221225 .ArticleDetail {
222226 margin-top : 1rem ;
223227 width : 100% ;
224- height : 800px ;
225228 }
226229
227230 .ArticleDetail textarea {
230233 }
231234 .WriteSubmit {
232235 text-align : right ;
233- margin-top : 1 rem ;
236+ margin-left : 10 px ;
234237 }
235238 .editortoolbar {
236239 border : 1px solid #ccc ;
You can’t perform that action at this time.
0 commit comments