title: feed-item 信息流子项 header: develop nav: extended sidebar: smt-feed-item

webUrl: https://qft12m.smartapps.cn/extensions/component/smt-feed-item/smt-feed-item

解释: 信息流子项,包括左文右图、纯文本、上文下图、多图及视频模式。

属性说明

属性名 类型 必填 默认值 说明
theme string default 信息流子项的主题:default是左文右图模式,如不配置content中的images则是纯文本子项;large-image是大图模式;multiple-images是多图模式
content Object {title: '这个是子项的标题',infoSource: '百度新闻',commentsNum: 2,images: []} 信息流子项目的内容,包含标题(title),消息来源(infoSource),评论数(commentsNum),图片路径(images)
video Object {isVideo: true, time: '05:00'} 是否为视频和视频信息,配置isVideo为true,则显示视频形式(注:在多图模式不生效)
status String 0 阅读状态:0未读,1已读

示例

在开发者工具中预览效果

扫码体验

webUrl: https://qft12m.smartapps.cn/extensions/component/smt-feed-item/smt-feed-item - 图1

代码示例

:::codeTab

  1. <smt-feed-item
  2. theme="{{theme}}"
  3. content="{{content}}"
  4. video="{{video}}"
  5. status="{{status}}"
  6. >
  7. </smt-feed-item>
  1. Page({
  2. data: {
  3. theme: 'default',
  4. content: {
  5. title: '这个是子项的标题',
  6. infoSource: '百度新闻',
  7. commentsNum: 2,
  8. images: []
  9. },
  10. video: {
  11. isVideo: true,
  12. time: '02:00'
  13. },
  14. status: '0'
  15. }
  16. });

:::