# 6.9 增强滑块(EP Slider)
增强版滑块组件,支持卡片式展示
# 基础用法
<template>
<dof-ep-slider
:card-length="3"
:select-index="0"
@dofEpSliderPullMore="onPullMore"
@dofEpSliderCurrentIndexSelected="onIndexSelected"
></dof-ep-slider>
</template>
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
# Attributes
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
slider-id | String / Number | N | 1 | 滑块标识 |
pan-offset | Number | N | 80 | 拖动偏移量 |
card-length | Number | N | 1 | 卡片数量 |
select-index | Number | N | 0 | 当前选中索引 |
enable-swipe | Boolean | N | true | 当前版本未使用该属性,暂不生效 |
container-s | Object | N | {"position":"relative","width":750,"height":352} | 容器样式 |
card-s | Object | N | {"width":360,"height":300,"spacing":0,"scale":0.75} | 卡片样式 |
auto-play | Boolean | N | false | 是否自动播放 |
interval | Number / String | N | 1200 | 自动播放间隔 |
isRTL | Boolean | N | false | 是否启用 RTL(从右到左)布局;默认关闭 ^2.5.10 |
RTL 下卡片排列及滑动方向镜像,卡片数据无需反转;选中页和事件索引保持原有逻辑顺序。
# Events
| 事件名 | 说明 | 回调参数 |
|---|---|---|
dofEpSliderPullMore | 滑动到末尾继续拖动时触发 | { currentIndex } |
dofEpSliderCurrentIndexSelected | 当前索引选中时触发 | { currentIndex } |