Skip to content

Commit

Permalink
fix:md样式优化
Browse files Browse the repository at this point in the history
  • Loading branch information
mao888 committed May 2, 2023
1 parent 45a0224 commit 754438a
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 8 deletions.
23 changes: 18 additions & 5 deletions bluebell_frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions bluebell_frontend/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import 'element-ui/lib/theme-chalk/index.css'
import '../node_modules/free-min/dist/Free'
import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'
import 'github-markdown-css/github-markdown.css' // 然后添加样式markdown-body


Vue.use(ElementUI);
Vue.use(mavonEditor)
Expand Down
10 changes: 8 additions & 2 deletions bluebell_frontend/src/views/Content.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</div>
<div class="l-container">
<h4 class="con-title">{{ post.title }}</h4>
<div class="con-info" v-html="post.content"></div>
<div class="con-info markdown-body" v-html="post.content"></div>
</div>
</div>
<!-- 评论区 -->
Expand All @@ -35,7 +35,6 @@
</div>
</template>
<script>
import 'github-markdown-css/github-markdown.css' // 然后添加样式markdown-body
import Comment from '../components/Comment.vue';
import Vue from 'vue';
export default {
Expand Down Expand Up @@ -181,6 +180,13 @@ export default {
.con-info {
margin: 25px 0;
line-height: 2;
code{
overflow-x: scroll !important;
::-webkit-scrollbar {
width: 10px;
height: 10px;
}
}
}
.con-cover {
Expand Down
2 changes: 1 addition & 1 deletion bluebell_frontend/src/views/Publish.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</div>
<!---此处放置富文本--->
<div class="post-text-con">
<mavon-editor style="min-height:400px;" v-model="content" />
<mavon-editor style="max-height: 600px;" v-model="content" />
</div>
</div>
<div class="post-footer">
Expand Down

0 comments on commit 754438a

Please sign in to comment.