大促组件 / 会场 / cu-promo-capsule-words 胶囊词
01 / Overview

cu-promo-capsule-words

胶囊词条:单行 / 双行两态,可换一批。

会场 参考件 hallcapsule 1 档 已上线
02 / Demo

档位与实时预览

档位数演示页平台
1 /pages/promo/venue?name=cu-promo-capsule-words App / H5 / 微信

右侧的预览由站点脚本把 H5 演示页装进 iframe;切档位与主题在演示页顶部操作,不在此处留静态截图。

03 / Props · Events · Slots

全量契约

props

参数说明类型默认值
words词条数组(字符串);元素 '' + v 转换;空串元素不渲染Array[]
lines1 / 2;其它值 → 2 + cuWarn 一次Number2
showRefresh只在 lines == 2 生效;false 不渲染换一批Booleantrue
max最多显示条数;0 = 单行全显示 / 双行 12 条;< 0 按 0;超过可用条数按可用条数Number0

events

事件说明载荷
@change点击词条时触发,value 为原文value, index
@action点击换一批时触发,type 为 refreshtype, item, index

slots

插槽说明
default整个组件替换
04 / Example

代码示例

uvue
<cu-promo-capsule-words :words="words" :lines="2" />
05 / Notes

注意事项

换一批只发事件,不改内部数据。

change.value 为未截断的词条原文。

安装 colorui-promo 全量包与安装任意 cu-promo-* 单件包二选一,不要同时装。单件包的前提是已安装完整 colorui-x。