image.vue 614 B

123456789101112131415161718192021222324252627282930
  1. <script>
  2. export default {
  3. name: "lemonMessageImage",
  4. inheritAttrs: false,
  5. render() {
  6. return (
  7. <lemon-message-basic
  8. class="lemon-message-image"
  9. props={{ ...this.$attrs }}
  10. scopedSlots={{
  11. content: props => <img src={props.content} />
  12. }}
  13. />
  14. );
  15. }
  16. };
  17. </script>
  18. <style lang="stylus">
  19. @import '~styles/utils/index'
  20. +b(lemon-message-image)
  21. +b(lemon-message)
  22. +e(content)
  23. padding 0
  24. cursor pointer
  25. overflow hidden
  26. img
  27. max-width 100%
  28. min-width 100px
  29. display block
  30. </style>