BoardAgentItem.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template>
  2. <div class="conversation-agent-item">
  3. <div class="agent-item-icon" @click="handleClick"></div>
  4. <div class="agent-item-intro" @click="handleClick">
  5. <div class="agent-item-intro-title">{{ title }}</div>
  6. <div class="agent-item-intro-desc">{{ desc }}</div>
  7. </div>
  8. </div>
  9. </template>
  10. <script setup>
  11. const props = defineProps({
  12. title: String,
  13. desc: String,
  14. id: String
  15. });
  16. const emit = defineEmits(['active']);
  17. const handleClick = () => {
  18. emit('active', props.id);
  19. };
  20. </script>
  21. <style lang="css" scoped>
  22. .conversation-agent-item {
  23. background-color: var(--color-bg-1);
  24. padding: 30px 40px 30px 40px;
  25. border-radius: 20px;
  26. display: flex;
  27. color: var(--color-text-1);
  28. }
  29. .agent-item-icon {
  30. width: 36px;
  31. height: 36px;
  32. background-color: #ccc;
  33. border-radius: 18px;
  34. margin-right: 5px;
  35. flex-shrink: 0;
  36. cursor: pointer;
  37. }
  38. .agent-item-intro {
  39. cursor: pointer;
  40. }
  41. .agent-item-intro-title {
  42. font-size: 18px;
  43. font-weight: bold;
  44. margin-bottom: 8px;
  45. }
  46. .agent-item-intro-desc {
  47. /* white-space: nowrap;
  48. overflow: hidden;
  49. text-overflow: ellipsis; */
  50. }
  51. </style>