Ver código fonte

创建试题和智能出题按钮合并

zhangjie 1 ano atrás
pai
commit
e4d5423923
1 arquivos alterados com 26 adições e 15 exclusões
  1. 26 15
      src/modules/question/views/QuestionManage.vue

+ 26 - 15
src/modules/question/views/QuestionManage.vue

@@ -69,14 +69,6 @@
             @click="toBatchDelete"
             >删除</el-button
           >
-          <el-button
-            v-if="gptQuestionEnable"
-            type="primary"
-            plain
-            icon="el-icon-tickets"
-            @click="toGPTQuestion"
-            >智能出题</el-button
-          >
           <el-button
             type="primary"
             plain
@@ -84,13 +76,32 @@
             @click="toAddFolder"
             >新建文件夹</el-button
           >
-          <el-button
-            type="primary"
-            plain
-            icon="el-icon-circle-plus-outline"
-            @click="toCreateQuestion"
-            >创建试题</el-button
-          >
+          <el-dropdown>
+            <el-button type="primary" plain icon="el-icon-circle-plus-outline"
+              >创建试题</el-button
+            >
+            <el-dropdown-menu slot="dropdown" class="action-dropdown">
+              <el-dropdown-item>
+                <el-button
+                  size="mini"
+                  type="primary"
+                  plain
+                  @click="toCreateQuestion"
+                  >手动创建</el-button
+                >
+              </el-dropdown-item>
+              <el-dropdown-item>
+                <el-button
+                  v-if="gptQuestionEnable"
+                  size="mini"
+                  type="primary"
+                  plain
+                  @click="toGPTQuestion"
+                  >智能出题</el-button
+                >
+              </el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
           <el-button
             type="primary"
             plain