text.vue 824 B

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