From 3b1849fb70a41aea4b592e6e977f32b2dbd9eccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B1=E7=9C=A0=E5=84=80=E5=BC=8F?= <854085467@qq.com> Date: Sat, 30 Apr 2022 03:44:28 +0800 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F(component):=20=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=20setup=20script=20=E9=87=8D=E6=9E=84=20scroll=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/src/component/scroll/index.less | 30 +- .../component/src/component/scroll/index.vue | 387 +++++++++--------- 2 files changed, 202 insertions(+), 215 deletions(-) diff --git a/package/component/src/component/scroll/index.less b/package/component/src/component/scroll/index.less index 62cb2a55..892a0d75 100644 --- a/package/component/src/component/scroll/index.less +++ b/package/component/src/component/scroll/index.less @@ -1,44 +1,34 @@ -.scrollbar-box { +.layui-scroll { height: 100%; overflow: hidden !important; } -.scrollbar-y { +.layui-scroll-y { position: relative; height: 100%; - .scroll-wrap { + + .layui-scroll-wrap { height: 100%; overflow-y: scroll; - scrollbar-width: none; /* firefox */ + scrollbar-width: none; -ms-overflow-style: none; } - .scrollbar-track { + .layui-scroll-track { position: absolute; top: 0; right: 0; bottom: 0; border-radius: 8px; z-index: 20; - .scrollbar-thumb { + .layui-scroll-thumb { margin: 0 auto; border-radius: 6px; cursor: default; } } } -.scrollbar-y ::-webkit-scrollbar { + +.layui-scroll-y ::-webkit-scrollbar { display: none; -} -//移动端隐藏自定义滚动条 -.hide.scrollbar-box .scrollbar-track { - display: none; -} -//移动端显示原生滑块 -.hide.scrollbar-box .scrollbar-y ::-webkit-scrollbar { - display: block; -} -.hide.scrollbar-box .scrollbar-y .scroll-wrap { - scrollbar-width: auto; - -ms-overflow-style: scrollbar; -} +} \ No newline at end of file diff --git a/package/component/src/component/scroll/index.vue b/package/component/src/component/scroll/index.vue index 278fb2a4..dc51e75a 100644 --- a/package/component/src/component/scroll/index.vue +++ b/package/component/src/component/scroll/index.vue @@ -1,16 +1,16 @@ - + +