ChatingEmojiBar.vue 994 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <template>
  2. <view class="chat_emoji_bar">
  3. <view class="emoji_row">
  4. <view
  5. @click="clickEmoji(emoji)"
  6. v-for="emoji in emojiList"
  7. :key="emoji"
  8. style="display: flex;justify-content: center;align-items: center;width: 10%;">
  9. <text style="font-size: 20px;margin-bottom: 6px;">{{ emoji }}</text>
  10. </view>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. import emojis from "../../../../../common/emojis.js";
  16. export default {
  17. components: {},
  18. data() {
  19. return {};
  20. },
  21. computed: {
  22. emojiList() {
  23. return emojis;
  24. },
  25. },
  26. mounted() {},
  27. methods: {
  28. clickEmoji(emoji) {
  29. this.$emit("insertEmoji", emoji);
  30. },
  31. backspace() {
  32. this.$emit("backspace");
  33. },
  34. },
  35. };
  36. </script>
  37. <style lang="scss" scoped>
  38. .chat_emoji_bar {
  39. padding: 24rpx 36rpx;
  40. position: relative;
  41. .emoji_row {
  42. display: flex;
  43. align-items: center;
  44. justify-content: flex-start;
  45. flex-wrap: wrap;
  46. margin-bottom: 12rpx;
  47. }
  48. }
  49. </style>