Quellcode durchsuchen

修改bug

master
suomingxiang vor 2 Monaten
Ursprung
Commit
dd35f37da7
2 geänderte Dateien mit 29 neuen und 15 gelöschten Zeilen
  1. 18
    8
      src/pages/articleDetails/index.less
  2. 11
    7
      src/pages/common/js/Common.js

+ 18
- 8
src/pages/articleDetails/index.less Datei anzeigen

@@ -70,9 +70,9 @@
70 70
             margin-top: 80px;
71 71
             .title{
72 72
                 font-weight: bold;
73
-                font-size: 40px;
73
+                font-size: 38px;
74 74
                 color: #333333;
75
-                text-align: left;
75
+                text-align: center;
76 76
                 margin-bottom: 80px;
77 77
             }
78 78
             .date{
@@ -97,8 +97,9 @@
97 97
             width: 100%;
98 98
             background-color: #EAECEF;
99 99
             img{
100
-                width: 100%;
101
-                height: 731px;
100
+                // width: 100%;
101
+                width: auto;
102
+                // height: 731px;
102 103
             }
103 104
         }
104 105
         .detail_footer{
@@ -119,17 +120,23 @@
119 120
         }
120 121
         
121 122
     }
123
+    img{
124
+        width: auto;
125
+    }
126
+    p{
127
+        white-space: pre-wrap;
128
+    }
122 129
 }
123 130
 a{
124 131
     display: inline-block;
125 132
 }
126 133
 
127
-.main img{
128
-    width: auto !important;
129
-}
130 134
 .ql-align-center{
131 135
     text-align: center;
132 136
 }
137
+.ql-align-right{
138
+    text-align: right;
139
+}
133 140
 @media screen and (min-width: 801px) and (max-width: 1400px) {
134 141
     .main{
135 142
         
@@ -216,7 +223,7 @@ a{
216 223
                 background-color: #EAECEF;
217 224
                 img{
218 225
                     width: 100%;
219
-                    height: 40.125vw;
226
+                    // height: 40.125vw;
220 227
                 }
221 228
             }
222 229
             .detail_footer{
@@ -234,5 +241,8 @@ a{
234 241
                 }
235 242
             }
236 243
         }
244
+        img{
245
+            max-width: 100%;
246
+        }
237 247
     }
238 248
 }

+ 11
- 7
src/pages/common/js/Common.js Datei anzeigen

@@ -149,16 +149,20 @@ export default class Common {
149 149
 
150 150
     try {
151 151
       let logo = document.querySelector(".headerPC .logo");
152
-      logo.addEventListener("click", (e) => {
153
-        window.location.href = "./index.html"
154
-      });
152
+      if(logo){
153
+        logo.addEventListener("click", (e) => {
154
+          window.location.href = "./index.html"
155
+        });
156
+      }
155 157
   
156 158
       let logos = document.querySelector(".headerPC .logos");
157
-      logos.addEventListener("click", (e) => {
158
-        window.location.href = "../index.html"
159
-      });
159
+      if(logos){
160
+        logos.addEventListener("click", (e) => {
161
+          window.location.href = "../index.html"
162
+        });
163
+      }
160 164
     } catch (error) {
161
-      
165
+      console.log(error)
162 166
     }
163 167
    
164 168
 

Laden…
Abbrechen
Speichern