在页面最外层盒子上
<view class="container"> </view>
.container {{
width: 100vw !important;
height: 100vh !important;
overflow-x: hidden !important;
overflow-y: auto !important;
}
在App.vue中的全局公共样式
<style>
/*每个页面公共css */
body,
html {
overflow-x: hidden;
}
body::-webkit-scrollbar {
display: none;
}
</style>