ZhangXianQiang
2024-06-05 21306411e7185938d0cedb95cb43cf963841cc58
feat:答题信息
2个文件已修改
3个文件已添加
82 ■■■■■ 已修改文件
components.d.ts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/test.png 补丁 | 查看 | 原始文档 | blame | 历史
src/components/ExamInfo/index.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/exam/components/answer-main/answer-single/index.vue 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/exam/index.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
components.d.ts
@@ -25,6 +25,7 @@
    ElTabPane: typeof import('element-plus/es')['ElTabPane']
    ElTabs: typeof import('element-plus/es')['ElTabs']
    ElTag: typeof import('element-plus/es')['ElTag']
    ExamInfo: typeof import('./src/components/ExamInfo/index.vue')['default']
    ExamInfoDialog: typeof import('./src/components/ExamInfoDialog/index.vue')['default']
    Header: typeof import('./src/components/Header/index.vue')['default']
    HelloWorld: typeof import('./src/components/HelloWorld.vue')['default']
src/assets/test.png
src/components/ExamInfo/index.vue
New file
@@ -0,0 +1,22 @@
<template>
  <div class="info-container w-full">
    <div class="exam-title break-all mb-4 text-base text-gray-700">
      1.测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试
    </div>
    <div class="img-container flex">
      <div class="img-item">
        <img src="@/assets/test.png" class="width-img" alt="">
      </div>
    </div>
  </div>
</template>
<script setup>
</script>
<style lang="scss" scoped>
.img-item {
  max-width: 500px;
}
</style>
src/views/exam/components/answer-main/answer-single/index.vue
New file
@@ -0,0 +1,32 @@
<template>
  <div class="answer-container w-full h-full">
    <el-scrollbar>
      <ExamInfo></ExamInfo>
      <div class="answer-content">
        <div class="answer-item flex">
          <div class="answer-icon flex justify-center items-center">A</div>
          <div class="answer-text"></div>
        </div>
      </div>
    </el-scrollbar>
  </div>
</template>
<script setup>
import ExamInfo from '@/components/ExamInfo/index.vue';
</script>
<style lang="scss" scoped>
.answer-item {
  max-width: 400px;
  border-radius: 10px;
  padding: 10px 0;
  border: 1px solid #EBEEF5;
  .answer-icon {
    width: 50px;
    height: 100%;
  }
}
</style>
src/views/exam/index.vue
@@ -8,6 +8,7 @@
            测试测试测试
          </div>
        </div>
        <div class="exam-main grow flex justify-between">
          <!-- 答题卡区 -->
          <div class="answer-wrapper answer-left mr-8 shadow-xl p-4 box-border">
@@ -28,7 +29,7 @@
              </div>
              <div class="submit-wrapper">
                <el-button type="primary" class="submit-button w-40">提交试卷</el-button>
                <el-button type="primary" class="submit-button">提交试卷</el-button>
              </div>
            </div>
@@ -41,8 +42,21 @@
                <div class="title text-xl font-semibold ">单选题 (3分)</div>
              </div>
              <div class="main-wrapper">
              <div class="main-wrapper w-full grow relative my-5">
                <div class="main-content absolute top-0 bottom-0 w-full">
                  <AnswerSingle></AnswerSingle>
                </div>
              </div>
              <div class="tool-wrapper flex justify-end">
                <div class="button-container flex items-center">
                  <div class="button-item">
                    <el-button class="tool-button">上一题</el-button>
                  </div>
                  <div class="button-item">
                    <el-button class="tool-button" type="primary">下一题</el-button>
                  </div>
                </div>
              </div>
@@ -58,6 +72,8 @@
import AnswerTag from './components/answer-tag/index.vue';
import AnswerProgress from './components/answer-progress/index.vue';
import AnswerSheet from './components/answer-sheet/index.vue';
import AnswerSingle from './components/answer-main/answer-single/index.vue';
</script>
@@ -101,7 +117,12 @@
  width: 340px;
}
.submit-button {
.submit-button,
.tool-button {
  width: 160px;
  height: 40px;
}
.tool-button {
  margin: 0 20px;
}
</style>