index.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template>
  2. <el-row :gutter="10">
  3. <el-col :span="8">
  4. <ContentWrap>
  5. <KeFuConversationBox ref="keFuConversationRef" @change="handleChange" />
  6. </ContentWrap>
  7. </el-col>
  8. <el-col :span="16">
  9. <ContentWrap>
  10. <KeFuChatBox ref="keFuChatBoxRef" />
  11. </ContentWrap>
  12. </el-col>
  13. </el-row>
  14. </template>
  15. <script lang="ts" setup>
  16. import { KeFuChatBox, KeFuConversationBox } from './components'
  17. defineOptions({ name: 'KeFu' })
  18. const keFuChatBoxRef = ref<InstanceType<typeof KeFuChatBox>>()
  19. const handleChange = () => {}
  20. const keFuConversationRef = ref<InstanceType<typeof KeFuConversationBox>>()
  21. onMounted(() => {
  22. keFuConversationRef.value?.getConversationList()
  23. })
  24. </script>
  25. <style lang="scss">
  26. .kefu {
  27. height: calc(100vh - 165px);
  28. overflow: auto; /* 确保内容可滚动 */
  29. }
  30. /* 定义滚动条样式 */
  31. ::-webkit-scrollbar {
  32. width: 10px;
  33. height: 6px;
  34. }
  35. /*定义滚动条轨道 内阴影+圆角*/
  36. ::-webkit-scrollbar-track {
  37. box-shadow: inset 0 0 0px rgba(240, 240, 240, 0.5);
  38. border-radius: 10px;
  39. background-color: #fff;
  40. }
  41. /*定义滑块 内阴影+圆角*/
  42. ::-webkit-scrollbar-thumb {
  43. border-radius: 10px;
  44. box-shadow: inset 0 0 0px rgba(240, 240, 240, 0.5);
  45. background-color: rgba(240, 240, 240, 0.5);
  46. }
  47. </style>