CarderInteraction.ets 1.51 KB
import { ToastUtils } from 'wdKit';

/**
 * 卡片 分享、评论、点赞公用组件
 */
@Component
export struct CarderInteraction {
   build() {
      Row(){
        Row(){
          Image($r('app.media.CarderInteraction_share'))
            .width(18)
            .height(18)
          Text('分享')
            .margin({left:4})
            .fontSize(14)
            .fontColor('#666666')
        }
        .justifyContent(FlexAlign.Center)
        .onClick(()=>{
          ToastUtils.showToast('分享为公共方法,待开发', 1000)
        })
        Row(){
          Image($r('app.media.CarderInteraction_comment'))
            .width(18)
            .height(18)
          Text('评论')
            .margin({left:4})
            .fontSize(14)
            .fontColor('#666666')
        }
        .justifyContent(FlexAlign.Center)
        .onClick(()=>{
          ToastUtils.showToast('分享为公共方法,待开发', 1000)
        })
        Row(){
          Image($r('app.media.CarderInteraction_like'))
            .width(18)
            .height(18)
          Text('点赞')
            .margin({left:4})
            .fontSize(14)
            .fontColor('#666666')
        }
        .justifyContent(FlexAlign.Center)
        .onClick(()=>{
          ToastUtils.showToast('分享为公共方法,待开发', 1000)
        })
      }
     .width('100%')
      .margin({top:11})
     .padding({
       left:21,
       right:21
     })
     .justifyContent(FlexAlign.SpaceBetween)
      .alignItems(VerticalAlign.Center)
   }
}