Browse Source

修改图片的显示

aaa 3 years ago
parent
commit
516c952973
1 changed files with 9 additions and 1 deletions
  1. 9 1
      src/views/home/learn/page-learn-content.vue

+ 9 - 1
src/views/home/learn/page-learn-content.vue

@@ -13,7 +13,7 @@
       <div class="learn-content-body-auther">编辑:{{ contentObj.userId }}</div>
       <div class="learn-content-body-description">
         <!-- {{ contentObj.contents }} -->
-        <p v-html="contentObj.contents">{{ contentObj.contents }}</p>
+        <p class="p-content" v-html="contentObj.contents">{{ contentObj.contents }}</p>
       </div>
       <div class="learn-content-body-time-row">
         <div class="learn-content-body-time">
@@ -537,3 +537,11 @@ export default {
   }
 }
 </style>
+
+<style lang="scss">
+.p-content img {
+    max-width: 100%;
+    width: auto;
+    height: auto;
+}
+</style>