react组件 类似手机联系人滑动索引
npm install slider-index --save-dev
<Slider touchMoveCallback={(e, index) => { location.hash = index;} }
index="H"
centerStyle="center"
rightListStyle="rList"
/>
- touchMoveCallback: e => { }, 滑动时回调函数
- index: 'A', 初始化时默认选中元素
- centerStyle:'', 中间弹窗样式名称
- rightListStyle: '', 列表样式名称
- rightListItemStyle: '', 列表元素样式名称
- fontSizeInRight: '20', 列表中字体大小 单位px
- fontSizeInCenter: '50', 列表中放大字体大小 单位px
npm i
npm start