index.wxml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <van-search value="{{ condition }}" shape="round" background="var(--primary)" bind:search='startSearch' placeholder="搜索联系人" />
  2. <add isGroup bind:callBack='toAddContacts' bind:openDialog='openDialog' />
  3. <!-- 系统分组 -->
  4. <view class="group-box">
  5. <view class="title">系统群组</view>
  6. <navigator url="#" class="group" wx:for="{{systemGroup}}" wx:key="item.groupname" bindtap="toCheckList" data-item="{{item}}">
  7. <view class="icon" style="background: #FA8C16;">
  8. <text class="iconfont icon-xiaochengxu_qunzu" />
  9. </view>
  10. <view class="text">
  11. <view class="name">{{item.groupname}}</view>
  12. <view class="count">已有 {{item.phonebook.length}} 人</view>
  13. </view>
  14. <van-icon size='14' color='#D2D2D2' name="arrow" />
  15. </navigator>
  16. </view>
  17. <!-- 自定义分组 -->
  18. <view class="group-box">
  19. <view class="title">自定义群组</view>
  20. <van-swipe-cell id="swipe-cell" async-close right-width="{{ 120 }}" wx:for="{{myGroup}}" wx:key="item.groupname" bind:close="onClose">
  21. <van-cell-group>
  22. <navigator url="#" class="group" bindtap="toCheckList" data-item="{{item}}">
  23. <view class="icon" style="background: #52C41A;">
  24. <text class="iconfont icon-xiaochengxu_qunzu" />
  25. </view>
  26. <view class="text">
  27. <view class="name">{{item.groupname}}</view>
  28. <view class="count">已有 {{item.phonebook.length}} 人</view>
  29. </view>
  30. <van-icon size='14' color='#D2D2D2' name="arrow" />
  31. </navigator>
  32. </van-cell-group>
  33. <view slot="right" class="slide">
  34. <van-button custom-class='but' color="#FA8C16" bindtap="openDialog" data-item="{{item}}">编辑</van-button>
  35. <van-button custom-class='but' color="#FF3B30" bindtap="deleteGroup" data-item="{{item}}">删除</van-button>
  36. </view>
  37. </van-swipe-cell>
  38. </view>
  39. <!-- 添加群组 -->
  40. <van-dialog use-slot title="添加群组" show="{{ dialogShow }}" showCancelButton confirmButtonText='确定' confirm-button-color='var(--assist)' bind:confirm='handleAddGroup' bind:cancel='onCancel'>
  41. <view class="group">
  42. <input type="text" placeholder="请输入群组名称" bindinput="inputName" value="{{groupName}}" class="group-name" />
  43. </view>
  44. </van-dialog>