Jelajahi Sumber

修改图片的显示

aaa 3 tahun lalu
induk
melakukan
516c952973
1 mengubah file dengan 9 tambahan dan 1 penghapusan
  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-auther">编辑:{{ contentObj.userId }}</div>
       <div class="learn-content-body-description">
       <div class="learn-content-body-description">
         <!-- {{ contentObj.contents }} -->
         <!-- {{ contentObj.contents }} -->
-        <p v-html="contentObj.contents">{{ contentObj.contents }}</p>
+        <p class="p-content" v-html="contentObj.contents">{{ contentObj.contents }}</p>
       </div>
       </div>
       <div class="learn-content-body-time-row">
       <div class="learn-content-body-time-row">
         <div class="learn-content-body-time">
         <div class="learn-content-body-time">
@@ -537,3 +537,11 @@ export default {
   }
   }
 }
 }
 </style>
 </style>
+
+<style lang="scss">
+.p-content img {
+    max-width: 100%;
+    width: auto;
+    height: auto;
+}
+</style>