2 Commits 3328b96ebe ... 5e35dea4c5

Author SHA1 Message Date
  yuanmingze 5e35dea4c5 Merge branch 'feature-wecht-260401' into pre 1 month ago
  yuanmingze d371bec717 移除不必要的代码,优化页面加载逻辑,禁止外层滚动 1 month ago
1 changed files with 1 additions and 16 deletions
  1. 1 16
      src/views/register/index.vue

+ 1 - 16
src/views/register/index.vue

@@ -29,7 +29,7 @@
 </template>
 
 <script setup lang="ts">
-import { ref, onMounted, onUnmounted } from 'vue'
+import { ref, onMounted } from 'vue'
 import { useRouter } from 'vue-router'
 import { showFailToast } from 'vant'
 import { REGISTER_URL_KEY } from '@/constants/storage'
@@ -54,9 +54,6 @@ const onLoad = () => {
 }
 
 onMounted(() => {
-  // 禁止外层滚动,避免出现页面滚动条
-  document.body.style.overflow = 'hidden'
-
   if (props.src) {
     realSrc.value = props.src
     return
@@ -70,10 +67,6 @@ onMounted(() => {
     router.back()
   }
 })
-
-onUnmounted(() => {
-  document.body.style.overflow = ''
-})
 </script>
 
 <style lang="scss" scoped>
@@ -118,12 +111,4 @@ onUnmounted(() => {
     color: #999;
   }
 }
-
-/* 站点级兜底:去掉默认间距并禁掉页面滚动(scoped 下需 :global) */
-:global(html, body) {
-  margin: 0;
-  padding: 0;
-  overflow: hidden;
-  overscroll-behavior: none;
-}
 </style>