text.vue 778 B

12345678910111213141516171819202122232425262728293031323334
  1. <script>
  2. export default {
  3. name: "lemonMessageText",
  4. inheritAttrs: false,
  5. inject: ["IMUI"],
  6. render() {
  7. return (
  8. <lemon-message-basic
  9. class="lemon-message-text"
  10. props={{ ...this.$attrs }}
  11. scopedSlots={{
  12. content: props => {
  13. const content = this.IMUI.replaceEmojiName(props.content);
  14. return <span domProps={{ innerHTML: content }} />;
  15. }
  16. }}
  17. />
  18. );
  19. }
  20. };
  21. </script>
  22. <style lang="stylus">
  23. @import '~styles/utils/index'
  24. +b(lemon-message-text)
  25. +b(lemon-message)
  26. +e(content)
  27. img
  28. width 18px
  29. height 18px
  30. display inline-block
  31. background transparent
  32. padding 0 2px
  33. vertical-align middle
  34. </style>