Przeglądaj źródła

feat: non-rem body class mark

Acathur 5 lat temu
rodzic
commit
11def91b38

+ 1 - 1
layouts/kaifain_v2.vue

@@ -23,7 +23,7 @@ export default {
   head() {
     return {
       bodyAttrs: {
-        class: 'kaifain-view'
+        class: ['kaifain-view', 'non-rem']
       }
     }
   },

+ 4 - 1
pages/kaifain/case/_tid.vue

@@ -63,7 +63,10 @@
         }, {
           'name': 'h1',
           'content': '开发屋'
-        } ]
+        } ],
+        bodyAttrs: {
+          class: 'non-rem'
+        }
       }
     },
     async asyncData(ctx) {

+ 3 - 0
pages/kaifain/detail/_tid/index.vue

@@ -163,6 +163,9 @@ export default {
           content: `${title}`,
         },
       ],
+      bodyAttrs: {
+        class: 'non-rem'
+      }
     };
   },
   async asyncData(ctx) {

+ 1 - 1
plugins/rem.js

@@ -5,7 +5,7 @@
   var tid;
   var rootItem, rootStyle;
 
-  if (document.body.className.indexOf('kaifain-view') > -1) {
+  if (document.body.className.indexOf('non-rem') > -1) {
     return
   }