ソースを参照

滚动事件调整

肖栋 1 週間 前
コミット
06fa83e651
2 ファイル変更18 行追加2 行削除
  1. 17 1
      src/pages/pc/index.vue
  2. 1 1
      src/utils/config.js

+ 17 - 1
src/pages/pc/index.vue

@@ -1,5 +1,9 @@
 <template>
-  <div ref="pageShellRef" class="page-shell">
+  <div
+    ref="pageShellRef"
+    class="page-shell"
+    :class="{ 'is-hide-scrollbar': route.name === 'mcpOnlineTest' }"
+  >
     <Header
       v-if="showDesktopHeader && !isFullScreen"
       :is-logged-in="Boolean(WEBSID)"
@@ -88,6 +92,18 @@ onBeforeMount(async () => {
   min-height: 0;
   overflow-y: auto;
   scrollbar-gutter: stable;
+
+  &.is-hide-scrollbar {
+    scrollbar-gutter: auto;
+    scrollbar-width: none;
+    -ms-overflow-style: none;
+
+    &::-webkit-scrollbar {
+      display: none;
+      width: 0;
+      height: 0;
+    }
+  }
 }
 
 .page-main {

+ 1 - 1
src/utils/config.js

@@ -1,5 +1,5 @@
 // 全局判断,true为测试,false为生产
-export const isPcBoolean = true;
+export const isPcBoolean = false;
 // 平台配置:'pc'
 export const PLATFORM = 'pc';