01 / Overview
cu-promo-follow-swipe
标签与内容双向联动的跟随滚动容器。
会场
参考件 followswipe
1 档
已上线
02 / Demo
档位与实时预览
| 档位数 | 演示页 | 平台 |
|---|---|---|
| 1 | /pages/promo/venue?name=cu-promo-follow-swipe | App / H5 / 微信 |
右侧的预览由站点脚本把 H5 演示页装进 iframe;切档位与主题在演示页顶部操作,不在此处留静态截图。
03 / Props · Events · Slots
全量契约
props
| 参数 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| tabs | 顶部/左侧标签文本数组;元素按 '' + v 转字符串;与 items 等长才联动(见下) | Array | [] |
| direction | horizontal / vertical;其它值 → horizontal + cuWarn 一次 | String | 'horizontal' |
events
| 事件 | 说明 | 载荷 |
|---|---|---|
| @change | 标签或内容滚动到新项时触发 | value, index |
| @click | 点击内容项时触发 | item, index |
slots
| 插槽 | 说明 |
|---|---|
| default | 整个组件替换 |
04 / Example
代码示例
<cu-promo-follow-swipe :tabs="tabs" :items="items" />
05 / Notes
注意事项
tabs 与 items 等长才联动。
change 载荷 value 为标签文本,越界为空串。
安装 colorui-promo 全量包与安装任意 cu-promo-* 单件包二选一,不要同时装。单件包的前提是已安装完整 colorui-x。