瀏覽代碼

游戏模块v1.6

李志伟 3 年之前
父節點
當前提交
4e11cb303e
共有 2 個檔案被更改,包括 6 行新增6 行删除
  1. 5
    5
      src/components/Question/edit.vue
  2. 1
    1
      src/components/Question/index.vue

+ 5
- 5
src/components/Question/edit.vue 查看文件

@@ -7,9 +7,9 @@
7 7
       <el-form-item label="题目:" prop="title">
8 8
         <el-input v-model="form.title" placeholder="请输入实例名(必填)">
9 9
           <el-select slot="prepend" v-model="form.optType" style="width:100px" placeholder="请选择">
10
-            <el-option label="单选题" value="1" />
11
-            <el-option label="多选题" value="2" />
12
-            <el-option label="判断题" value="3" />
10
+            <el-option label="单选题" value="single" />
11
+            <el-option label="多选题" value="many" />
12
+            <el-option label="判断题" value="judgment" />
13 13
           </el-select>
14 14
         </el-input>
15 15
       </el-form-item>
@@ -194,13 +194,13 @@ export default {
194 194
               }
195 195
               UpdateQuestion(data, this.questionId).then((res) => {
196 196
                 this.$message('修改问题成功')
197
-                // 告诉父页面实例表需要刷新并且关闭当前组件
197
+                // 告诉父页面问题表需要刷新并且关闭当前组件
198 198
                 this.$emit('handleRefreshQuestion', true)
199 199
               })
200 200
             } else {
201 201
               saveQuestion(data).then((res) => {
202 202
                 this.$message('添加问题成功')
203
-                // 告诉父页面实例表需要刷新并且关闭当前组件
203
+                // 告诉父页面问题表需要刷新并且关闭当前组件
204 204
                 this.$emit('handleRefreshQuestion', true)
205 205
                 this.$emit('handleEditQuestion', res.data.questionId)
206 206
               })

+ 1
- 1
src/components/Question/index.vue 查看文件

@@ -13,7 +13,7 @@
13 13
       <ul style="list-style-type: none;margin:24px 0 0 -40px">
14 14
         <li v-for="item,index in tableData" :key="index" class="questionli" @click="handleEdit(item)">
15 15
           <span style="width:45px">第{{ index+1 }}题</span>
16
-          <span style="width:45px">{{ item.optType === '1'?'单选题':item.optType==='2'?'多选题':'判断题' }}</span>
16
+          <span style="width:45px">{{ item.optType === 'single'?'单选题':item.optType==='many'?'多选题':'判断题' }}</span>
17 17
           <span style="flex:1">{{ item.title }}</span>
18 18
           <el-popconfirm
19 19
             style="width:30px"