- ������1
- ������2 ...
- ������30

本文共 3422 字,大约阅读时间需要 11 分钟。
���Vue���������Better-Scroll������������������������
Better-Scroll���������������������������������������PC���������������������������������������������������ISCroll���������API���������ISCroll������������������������������������������������������������������������������Better-Scroll������������������������������������������API������������������������������Vue���������������������������
Better-Scroll���������
������npm���������
npm install better-scroll --save
������JS���������
import BScroll from 'better-scroll'
������������������
���������������������������������������������������
rif (
`
`
������������������������������������������������������������������������������������������������������������������������������������������������������������������
Better-Scroll���������
Better-Scroll������������������������������������������������������������������������������������������������
new BScroll('.wrapper', { scrollY: true, // ������������������������������true probeType: 2, // ������������������������������������������0��������������������������� click: true, // ������������������click������������������false bounce: true, // ������������������������������������true momentum: true // ������������������������������������������true})
������probeType
���������ffect���
- 0������������������������������������������������������������������
- 1���������������������������������������������������������
- 2���������������������������������������������������
- 3���������������������������������������������������������������������
������������probeType
���������������������������������������������������
������������������
Better-Scroll������������������������������������������������������������������
������������������
������������������������
scroll
���������������������������������scrollEnd
���������������������������������pullingUp
���������������������pullingDown
���������������������refresh
������������������������������������
���������
this.scroll.on('scroll', pos => { console.log('������������������', pos)})
���Vue���������������
���Vue���������������Better-Scroll������������������ref������ DOM ���������������������������������������������Vue���������
- ������1
- ������2 ...
- ������30
���������������
- ��������������������� -probeType������3������������������������������������������������ -������������click������ -���������������������������������������Better-Scroll���API������
Better-Scroll���������������������������������API������������������������������
������������
refresh()
���������������������������������������������������scrollTo(pos)
������������������������scrollIntoView(target)
������������������DOM������
������������
scrollY
������������������������������������truescrollX
������������������������������������falsemaxScrollY
���������������������������������������������������eventPassthrough
������������������������������������ circumference
���������������������������
1. ���������������������������������������������������������������������overflow������������hidden
2. ���������������������������������������������������������������������
3. ������������������������������refresh()
���������������DOM������������
4. ���������������������������������content������������������_dimensions������������
Better-Scroll���������
���������
- ������������������ - ��������� - ���������API������ - ��������������� - ���������������������������������发表评论
最新留言
关于作者
