index.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <script setup>
  2. import { ref } from 'vue';
  3. import { NButton, NSpace, NDrawer } from 'naive-ui';
  4. import { BaseButton, RecodeCardItem, TheSubMenu, TheChatView, ChatWelcome } from '@/components';
  5. import { ChatAsk, ChatAnswer, ChatInput } from '@/components/Chat';
  6. const visible = ref(false);
  7. const changeVisible = () => {
  8. visible.value = !visible.value;
  9. }
  10. </script>
  11. <template>
  12. <section class="page-container">
  13. <header class="header">
  14. <NSpace>
  15. <n-button>下一页</n-button>
  16. <n-button @click="changeVisible">显示错误id</n-button>
  17. </NSpace>
  18. </header>
  19. <div class="main">
  20. <div class="answer-block" v-for="item in 100">
  21. <ChatAsk content="问题问题问题"></ChatAsk>
  22. <ChatAnswer content="回答回答回答回答回答" :toggleVisibleIcons="false"></ChatAnswer>
  23. <div class="answer-btns">
  24. <NSpace>
  25. <NButton type="success">对</NButton>
  26. <NButton type="error">错</NButton>
  27. </NSpace>
  28. </div>
  29. </div>
  30. </div>
  31. </section>
  32. <NDrawer placement="right" v-model:show="visible" width="600">123123</NDrawer>
  33. </template>
  34. <style lang="scss" scoped>
  35. .page-container {
  36. width: 100vw;
  37. height: 100vh;
  38. background: #edf7fc;
  39. .header {
  40. display: flex;
  41. justify-content: center;
  42. padding: 20px 0;
  43. background: #fff;
  44. }
  45. .main {
  46. width: 1000px;
  47. height: calc(100% - 74px);
  48. margin: 0 auto;
  49. overflow-y: scroll;
  50. .answer-block {
  51. border-bottom: 1px solid #000000;
  52. padding-bottom: 20px;
  53. }
  54. .answer-btns {
  55. display: flex;
  56. justify-content: flex-end;
  57. }
  58. }
  59. }
  60. </style>