Browse Source

文章图片宽度

natasha 1 year ago
parent
commit
b198e3e67a
1 changed files with 8 additions and 12 deletions
  1. 8 12
      src/views/bookShelf/articleDetail.vue

+ 8 - 12
src/views/bookShelf/articleDetail.vue

@@ -1379,18 +1379,6 @@ export default {
                               items.indexOf("width: ") + indexW + 7
                             )
                           : null,
-                      height:
-                        items.indexOf('height="') > -1
-                          ? items.substring(
-                              items.indexOf('height="') + 8,
-                              items.indexOf('height="') + indexH + 8
-                            )
-                          : items.indexOf("height: ") > -1
-                          ? items.substring(
-                              items.indexOf("height: ") + 8,
-                              items.indexOf("height: ") + indexH + 8
-                            )
-                          : null,
                     };
                     imgArr.push(imgobj);
                   }
@@ -2289,4 +2277,12 @@ export default {
     padding: 0;
   }
 }
+.NNPE-ArticleView {
+  figure {
+    font-size: 0;
+    img {
+      max-width: 100%;
+    }
+  }
+}
 </style>