emoji.wxml 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <view class="page" data-weui-theme="{{theme}}">
  2. <block wx:if="{{canIUse}}">
  3. <scroll-view scroll-y style="height: {{layoutHeight}}px" scroll-into-view="{{historyList[historyList.length - 1].id}}">
  4. <block wx:for="{{historyList}}" wx:for-index="idx" wx:for-item="historyItem">
  5. <view class="record" hidden="{{historyItem.length === 0}}" id="{{historyItem.id}}">
  6. <view class="avator"></view>
  7. <view class="comment">
  8. <block wx:for="{{historyItem.emoji}}" wx:key="*this">
  9. <block wx:if="{{item.type === 1}}">{{item.content}}</block>
  10. <view
  11. wx:if="{{item.type === 2}}"
  12. style="display: inline-block; width: {{lineHeight}}px; height: {{lineHeight}}px">
  13. <view
  14. class="{{item.imageClass}}"
  15. style="background-image: url({{emojiSource}});transform-origin: 0 0; transform: scale({{lineHeight / 64}});"></view>
  16. </view>
  17. </block>
  18. </view>
  19. </view>
  20. </block>
  21. </scroll-view>
  22. <view class="reply_wrp" style="bottom: {{isIOS ? keyboardHeight + safeHeight : keyboardHeight}}px">
  23. <view class="reply_tool">
  24. <view hover-class="active" class="reply_button replay_quick_button">
  25. <image src="{{theme === 'dark' ? './images/reply_tool_keyboard_dark.svg' : './images/reply_tool_keyboard.svg'}}" mode='aspectFit' class="reply_tool_pic"></image>
  26. </view>
  27. <view class="reply_form_wrp">
  28. <label for="" class="reply_label">
  29. <input
  30. class="reply_input"
  31. cursor-spacing="8px"
  32. confirm-type="send"
  33. adjust-position="{{false}}"
  34. confirm-hold value="{{comment}}"
  35. cursor="{{cursor}}"
  36. focus="{{focus}}"
  37. bindblur="onBlur"
  38. bind:focus="onFocus"
  39. bindinput="onInput"
  40. bindconfirm="onConfirm"
  41. bind:keyboardheightchange="onkeyboardHeightChange"
  42. />
  43. </label>
  44. </view>
  45. <view hover-class="active" class="reply_button replay_emotion_button" bindtap="showEmoji">
  46. <image src="{{theme === 'dark' ? './images/reply_tool_emoji_dark.svg' : './images/reply_tool_emoji.svg'}}" mode='aspectFit' class="reply_tool_pic"></image>
  47. </view>
  48. <view hover-class="active" class="reply_button replay_media_button" bindtap="showFunction">
  49. <image src="{{theme === 'dark' ? './images/reply_tool_add_dark.png' : './images/reply_tool_add.png'}}" mode='aspectFit' class="reply_tool_pic"></image>
  50. </view>
  51. </view>
  52. <view class="reply_panel_wrp" style="height: {{emojiShow ? 300 : 200}}px;" hidden="{{!emojiShow && !functionShow}}">
  53. <view class="reply_panel {{emojiShow ? 'show': ''}}" hidden="{{!emojiShow}}">
  54. <mp-emoji source="{{emojiSource}}" class="mp-emoji" bindinsertemoji="insertEmoji" binddelemoji="deleteEmoji" bindsend="onsend" backgroundColor="{{theme === 'dark' ? '#191919' : '#EDEDED'}}" theme="{{theme}}"></mp-emoji>
  55. </view>
  56. <view class="reply_panel {{functionShow ? 'show': ''}}" hidden="{{!functionShow}}">
  57. <swiper indicator-dots="{{true}}" indicator-color="#bbbbbb" indicator-active-color="#8c8c8c">
  58. <swiper-item>
  59. <view class="function_list">
  60. <view class="function_item" bindtap="chooseImage">
  61. <image src="{{theme === 'dark' ? './images/reply_function_image_dark.svg' : './images/reply_function_image.svg'}}" class="reply_function_pic"></image>
  62. </view>
  63. </view>
  64. </swiper-item>
  65. </swiper>
  66. </view>
  67. </view>
  68. </view>
  69. <view wx:if="{{isIOS}}" class="{{(emojiShow || functionShow) ? 'safearea_emojiShow' : 'safearea'}}" style="position:fixed; bottom: 0px; width: 100%; height: {{safeHeight}}px;"></view>
  70. </block>
  71. <view wx:else style="text-align: center; padding: 100px 0">
  72. 微信版本过低,暂不支持本功能
  73. </view>
  74. </view>