From b6c2773e5c9a32d56212096c91d42e2635c3fbf1 Mon Sep 17 00:00:00 2001 From: h_mo <596417202@qq.com> Date: Fri, 3 Jun 2022 12:53:33 +0800 Subject: [PATCH] =?UTF-8?q?perf-=20=E6=B7=BB=E5=8A=A0=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 17 +---------------- src/assets/style/main.scss | 14 ++++++++++++++ vite.config.ts | 7 +++++++ 3 files changed, 22 insertions(+), 16 deletions(-) create mode 100644 src/assets/style/main.scss diff --git a/src/App.vue b/src/App.vue index dca8c8e..f82fe70 100644 --- a/src/App.vue +++ b/src/App.vue @@ -11,19 +11,4 @@ console.log('App Hide'); }); - + diff --git a/src/assets/style/main.scss b/src/assets/style/main.scss new file mode 100644 index 0000000..32d3d27 --- /dev/null +++ b/src/assets/style/main.scss @@ -0,0 +1,14 @@ +:not(not), +::before, +::after { + box-sizing: border-box; +} + +/* 隐藏scroll-view的滚动条 */ +::-webkit-scrollbar { + display: none; + width: 0 !important; + height: 0 !important; + -webkit-appearance: none; + background: transparent; +} \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index a637c04..7928ea3 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -23,6 +23,13 @@ export default defineConfig({ cache: false, }), ], + css: { + preprocessorOptions: { + scss: { + additionalData: '@import "@/assets/style/main.scss";', + }, + }, + }, resolve: { alias: { '@': resolve('./src'),