@@ -224,7 +224,7 @@ export default {
224
224
* 监听滚动条滚动事件
225
225
* 原生滚动条为主,模拟滚动条跟随原生滚动条位置
226
226
* 这里不做节流,需要灵敏
227
- * ** /
227
+ * */
228
228
onScrollEvent () {
229
229
const dom = this .$refs [` ohyeahbody-${ this .id } ` ];
230
230
if (this .realShowH ) {
@@ -264,7 +264,7 @@ export default {
264
264
* 重置轨道高度
265
265
* 重置滑块高度
266
266
* 重置真实滚动条位置
267
- * ** /
267
+ * */
268
268
callback () {
269
269
const dom = this .$refs [` ohyeahbody-${ this .id } ` ];
270
270
const b = dom .getBoundingClientRect (); // boxbody大小
@@ -314,7 +314,7 @@ export default {
314
314
* @parame e 事件对象,为了得到当前鼠标在滑块上的位置
315
315
* @params type 1垂直滚动条,2水平滚动条
316
316
* @params targetNum 目标位置,用于在轨道上点击时瞬间记录最终位置,因为滚动可能为平滑滚动
317
- * ** /
317
+ * */
318
318
onBarMousedown (e , type , targetNum ) {
319
319
e .preventDefault ();
320
320
// 是否来自点击轨道,点击轨道需要保持平滑
@@ -338,7 +338,7 @@ export default {
338
338
* 轨道上鼠标按下
339
339
* @param e 事件对象
340
340
* @param type 1垂直滚动条/2水平滚动条
341
- * ** /
341
+ * */
342
342
onTrackMousedown (e , type ) {
343
343
e .preventDefault ();
344
344
// this.needSmooth = false;
@@ -403,7 +403,7 @@ export default {
403
403
/**
404
404
* 横向或纵向滚动条被拖拽
405
405
* @param e 拖动时的事件对象,为了实时获取鼠标位置
406
- * ** /
406
+ * */
407
407
onBarDragMove (e ) {
408
408
const dom = this .$refs [` ohyeahbody-${ this .id } ` ];
409
409
@@ -477,7 +477,7 @@ export default {
477
477
* @param x 水平真实滚动距离,null保持不变/'end'滚到底
478
478
* @param y 垂直真实滚动距离,null保持不变/'end'滚到底
479
479
* @param smooth 是否平滑滚动
480
- * ** /
480
+ * */
481
481
scrollTo (x , y , smooth ) {
482
482
const dom = this .$refs [` ohyeahbody-${ this .id } ` ];
483
483
const s_y =
@@ -508,7 +508,7 @@ export default {
508
508
},
509
509
/**
510
510
* 手动获取当前dom信息
511
- * ** /
511
+ * */
512
512
getScrollInfo () {
513
513
const dom = this .$refs [` ohyeahbody-${ this .id } ` ];
514
514
return {
@@ -554,16 +554,14 @@ export default {
554
554
}
555
555
}
556
556
/* 移动端时生效 解决安卓默认不显示dom滚动条 */
557
- // 算了,自定义的滚动条不好看,还不如没有
558
557
& .isAndroid {
559
558
& ::-webkit-scrollbar {
560
559
width : 2px ;
561
560
height : 2px ;
562
- padding : 1px ;
563
561
background-color : transparent ;
564
562
}
565
563
& ::-webkit-scrollbar-thumb {
566
- background-color : rgba (180 , 180 , 180 , 0.4 );
564
+ background-color : rgba (200 , 200 , 200 , 0.4 );
567
565
}
568
566
}
569
567
@@ -572,10 +570,6 @@ export default {
572
570
}
573
571
}
574
572
575
- & .mobile {
576
- overflow : auto ;
577
- -webkit-overflow-scrolling : touch ;
578
- }
579
573
& :hover {
580
574
& > .ohyeah-scroll-vertical-track-h ,
581
575
& > .ohyeah-scroll-vertical-track-w {
0 commit comments