DialogContent.vue 744 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <div class="dialog-chat-answer-content">
  3. <div v-if="is_loading">
  4. <a-spin></a-spin>
  5. </div>
  6. <div v-if="!is_loading" v-html="content" />
  7. <slot></slot>
  8. </div>
  9. </template>
  10. <script setup>
  11. import { computed } from 'vue';
  12. // 接收markdown数据,进行一些转换
  13. const props = defineProps({
  14. /**
  15. * 内容类型
  16. */
  17. type: String,
  18. /**
  19. * 文本内容
  20. */
  21. content: String,
  22. /**
  23. * 状态值
  24. */
  25. is_loading: Boolean
  26. });
  27. </script>
  28. <style lang="css" scoped>
  29. .dialog-chat-answer-content {
  30. background-color: var(--color-bg-1);
  31. color: var(--color-text-1);
  32. border-radius: 10px;
  33. padding: 18px;
  34. /* box-shadow: 0 0 5px #dedede; */
  35. box-shadow: 0 0 5px var(--color-text-4);
  36. }
  37. </style>