微信小程序-仿朋友圈点赞评论操作面板

微信小程序-仿朋友圈点赞评论操作面板

一、效果

在这里插入图片描述

二、实现

1.wxml实现

<!-- 
  wx:index = "index":列表循环后所有位置都可以访问索引
 -->
<view class="item" wx:for="{
   {list}}" wx:index = "index">
  <view class="left">
    <image class="avatar"></image>
  </view>
  <view class="right">
    <view class="nickname">{
   {
   item.nickName}}</view>
    <view class="content">{
   {
   item.content}}</view>
    <view class="image-list">
      <image class="image" wx:for="{
   {item.imageList}}"></image>
    </view>
    <view class="time-area">
      <view class="time">{
   {
   item.time}}</view>
      <view>
        <!--
           data-index="{
   {index}}"
            1.设置后在回调函数中currentTarget.dataset中显示
         -->
        <image class="operation-button" src="../../images/caozuo.png" catchtap="showOperationPannel" data-index="{
   {index}}"></image>
        <!-- 判断当前索引和面盘索引是否一致 -->
        <view class="operation-pannel" wx:if="{
   {showOperationPannelIndex == index}}">
          <view class="tab">
            <image class="image" src="../../images/love-white.png"></image>
            <text></text>
          </view>
          <view class="tab">
            <image class="image" src="../../images/comment-white.png"></image>
            <te
  • 4
    点赞
  • 38
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值