Browse Source

feat: 隐藏APP端滚动条

liangan 3 weeks ago
parent
commit
74b59fe54d
4 changed files with 19 additions and 7 deletions
  1. 8 5
      pages.config.ts
  2. 4 1
      src/pages.json
  3. 1 1
      src/pages/index/index.vue
  4. 6 0
      src/style/index.scss

+ 8 - 5
pages.config.ts

@@ -2,11 +2,14 @@ import { defineUniPages } from '@uni-helper/vite-plugin-uni-pages'
 
 export default defineUniPages({
   globalStyle: {
-    navigationStyle: 'default',
-    navigationBarTitleText: 'unibest',
-    navigationBarBackgroundColor: '#f8f8f8',
-    navigationBarTextStyle: 'black',
-    backgroundColor: '#FFFFFF',
+    'navigationStyle': 'default',
+    'navigationBarTitleText': 'unibest',
+    'navigationBarBackgroundColor': '#f8f8f8',
+    'navigationBarTextStyle': 'black',
+    'backgroundColor': '#FFFFFF',
+    'app-plus': {
+      scrollIndicator: 'none',
+    },
   },
   easycom: {
     autoscan: true,

+ 4 - 1
src/pages.json

@@ -4,7 +4,10 @@
     "navigationBarTitleText": "unibest",
     "navigationBarBackgroundColor": "#f8f8f8",
     "navigationBarTextStyle": "black",
-    "backgroundColor": "#FFFFFF"
+    "backgroundColor": "#FFFFFF",
+    "app-plus": {
+      "scrollIndicator": "none"
+    }
   },
   "easycom": {
     "autoscan": true,

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

@@ -130,7 +130,7 @@ onLoad(() => {
 </script>
 
 <template>
-  <z-paging ref="paging" v-model="dataList" use-page-scroll @query="queryList">
+  <z-paging ref="paging" v-model="dataList" bg-color="#fff" use-page-scroll @query="queryList">
     <template #top>
       <view
         class="flex items-center justify-between bg-white pb-40rpx pl-42rpx pr-34rpx pt-26rpx"

+ 6 - 0
src/style/index.scss

@@ -23,6 +23,12 @@ page {
   // --wot-button-primary-bg-color: green;
 }
 
+::-webkit-scrollbar {
+  width: 0 !important;
+  height: 0 !important;
+  display: none;
+}
+
 .wd-card.is-rectangle .wd-card__content::after {
   background: #e1e1e1 !important;
   transform: scaleY(1) !important;