SwAdMarquee

广告位四要素

  • 使用场景:公告位 / 顶栏横向滚动文字广告(slotKey 例 home_marquee)
  • 业界形态:Marquee(国内常见形态;AdSDK 格式 marquee)
  • 表现形态:文字横向无缝滚动跑马灯
  • 打点事件:同 banner —— adImpression(IntersectionObserver 进视口一次)/ adClick;自动内置零配置,gate 关闭静默 no-op

选错场景 = 埋点 ad_type / 时机全错。按场景选组件见 广告组件选型。

SwAdMarquee 是跑马灯文字广告位组件,属广告底座「文字卡片类」自渲染组件。多条文案横向无缝滚动,适合通知栏 / 滚动公告位。内置曝光 / 点击埋点。

跑马灯滚动

加载中...

scrollSpeedPx 速度对比

加载中...

左端 inline 角标(台标式)

加载中...

事件总览

加载中...

空数据 @empty

加载中...

Props

名称类型必填默认值说明
itemsSwAdItem[]✓—广告创意数组(用 title 作文案)
slotKeystring✓—广告位键 → ad_slot_key
slotNamestringundefined广告位名 → ad_slot_name
pageKeystringundefined页面键 → page_key
pageNamestringundefined页面名 → page_name
showAdLabelbooleanundefined「广告」合规角标(inline 行内形态,固定在条带左端不随内容滚动,滚动文字从其右侧滚过);不传时跟随全局 swiftConfig.ad.showLabel(默认 true),显式传值始终优先
scrollSpeedPxnumber50滚动速度(px/s)

Events

名称携带说明
load—渲染完成
empty—items 为空
impressionitems: SwAdItem[]曝光(自动埋点)
clickitem: SwAdItem点击某条文案(自动埋点)
error—渲染 / 加载错误
<SwAdMarquee :items="notices" slot-key="top_marquee" :scroll-speed-px="40" show-ad-label />

注意事项

  • 文案取 item.title;速度由 scrollSpeedPx(px/s)控制,越大越快。
  • 埋点内置,受 tracker 双重 gate。