index.vue 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <script setup lang="ts">
  2. const props = defineProps<{ d: any }>()
  3. const router = useRouter()
  4. function handleClickConsult() {
  5. sessionStorage.setItem('consult_teacher', JSON.stringify(props.d))
  6. router.push({ name: 'student_consult' })
  7. }
  8. </script>
  9. <template>
  10. <div class="bg-white h-120px rounded-md box_shadow flex flex-col justify-between p-3 ">
  11. <div class="flex items-center justify-between">
  12. <div class="flex space-x-4 items-center">
  13. <el-avatar :size="48" :src="d.dxp_user_avatar"></el-avatar>
  14. <div class="text-lg max-w-24 truncate">{{ d.dxp_user_realname }}</div>
  15. </div>
  16. <slot>
  17. <el-button type="primary" round @click="handleClickConsult">咨询</el-button>
  18. </slot>
  19. </div>
  20. <div class="text-hex-5B9FF0">联系电话:{{ d.dxp_user_phone }}</div>
  21. <div class="line-clamp-1 overflow-ellipsis text-hex-00000041 h-5 leading-5">
  22. {{ d.dxp_jj }}
  23. </div>
  24. </div>
  25. </template>
  26. <style scoped>
  27. .box_shadow {
  28. box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.04);
  29. }
  30. </style>