Pārlūkot izejas kodu

修改图片的显示

aaa 3 gadi atpakaļ
vecāks
revīzija
516c952973
1 mainītis faili ar 9 papildinājumiem un 1 dzēšanām
  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>