Browse Source

调整 eslint 配置

dusenyao 3 years ago
parent
commit
779c59443b

+ 7 - 1
.eslintrc.js

@@ -22,7 +22,13 @@ module.exports = {
     browser: true
   },
 
-  extends: ['eslint:recommended', 'plugin:vue/essential', 'plugin:vue/strongly-recommended', 'plugin:vue/recommended'],
+  extends: [
+    'eslint:recommended',
+    'plugin:vue/essential',
+    'plugin:vue/strongly-recommended',
+    'plugin:vue/recommended',
+    '@vue/eslint-config-prettier'
+  ],
 
   plugins: [
     // 注意这里不能配置 html 选项,为什么?https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-files

+ 57 - 0
package-lock.json

@@ -32,12 +32,14 @@
         "@babel/core": "^7.16.7",
         "@babel/eslint-parser": "^7.16.5",
         "@babel/preset-env": "^7.16.8",
+        "@rushstack/eslint-patch": "^1.1.0",
         "@vue/cli-plugin-babel": "~4.5.15",
         "@vue/cli-plugin-eslint": "~4.5.15",
         "@vue/cli-plugin-router": "~4.5.15",
         "@vue/cli-plugin-unit-jest": "^4.5.15",
         "@vue/cli-plugin-vuex": "~4.5.15",
         "@vue/cli-service": "~4.5.15",
+        "@vue/eslint-config-prettier": "^7.0.0",
         "@vue/test-utils": "^1.3.0",
         "babel-jest": "^27.4.6",
         "babel-loader": "^8.2.3",
@@ -2298,6 +2300,12 @@
         "url": "https://github.com/sponsors/isaacs"
       }
     },
+    "node_modules/@rushstack/eslint-patch": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.1.0.tgz",
+      "integrity": "sha512-JLo+Y592QzIE+q7Dl2pMUtt4q8SKYI5jDrZxrozEQxnGVOyYE+GWK9eLkwTaeN9DDctlaRAQ3TBmzZ1qdLE30A==",
+      "dev": true
+    },
     "node_modules/@soda/friendly-errors-webpack-plugin": {
       "version": "1.8.0",
       "dev": true,
@@ -3622,6 +3630,20 @@
       "dev": true,
       "license": "ISC"
     },
+    "node_modules/@vue/eslint-config-prettier": {
+      "version": "7.0.0",
+      "resolved": "https://registry.npmjs.org/@vue/eslint-config-prettier/-/eslint-config-prettier-7.0.0.tgz",
+      "integrity": "sha512-/CTc6ML3Wta1tCe1gUeO0EYnVXfo3nJXsIhZ8WJr3sov+cGASr6yuiibJTL6lmIBm7GobopToOuB3B6AWyV0Iw==",
+      "dev": true,
+      "dependencies": {
+        "eslint-config-prettier": "^8.3.0",
+        "eslint-plugin-prettier": "^4.0.0"
+      },
+      "peerDependencies": {
+        "eslint": ">= 7.28.0",
+        "prettier": ">= 2.0.0"
+      }
+    },
     "node_modules/@vue/preload-webpack-plugin": {
       "version": "1.1.2",
       "dev": true,
@@ -8772,6 +8794,18 @@
         "url": "https://opencollective.com/eslint"
       }
     },
+    "node_modules/eslint-config-prettier": {
+      "version": "8.3.0",
+      "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz",
+      "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==",
+      "dev": true,
+      "bin": {
+        "eslint-config-prettier": "bin/cli.js"
+      },
+      "peerDependencies": {
+        "eslint": ">=7.0.0"
+      }
+    },
     "node_modules/eslint-loader": {
       "version": "2.2.1",
       "dev": true,
@@ -24238,6 +24272,12 @@
         }
       }
     },
+    "@rushstack/eslint-patch": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.1.0.tgz",
+      "integrity": "sha512-JLo+Y592QzIE+q7Dl2pMUtt4q8SKYI5jDrZxrozEQxnGVOyYE+GWK9eLkwTaeN9DDctlaRAQ3TBmzZ1qdLE30A==",
+      "dev": true
+    },
     "@soda/friendly-errors-webpack-plugin": {
       "version": "1.8.0",
       "dev": true,
@@ -25182,6 +25222,16 @@
         }
       }
     },
+    "@vue/eslint-config-prettier": {
+      "version": "7.0.0",
+      "resolved": "https://registry.npmjs.org/@vue/eslint-config-prettier/-/eslint-config-prettier-7.0.0.tgz",
+      "integrity": "sha512-/CTc6ML3Wta1tCe1gUeO0EYnVXfo3nJXsIhZ8WJr3sov+cGASr6yuiibJTL6lmIBm7GobopToOuB3B6AWyV0Iw==",
+      "dev": true,
+      "requires": {
+        "eslint-config-prettier": "^8.3.0",
+        "eslint-plugin-prettier": "^4.0.0"
+      }
+    },
     "@vue/preload-webpack-plugin": {
       "version": "1.1.2",
       "dev": true,
@@ -28931,6 +28981,13 @@
         }
       }
     },
+    "eslint-config-prettier": {
+      "version": "8.3.0",
+      "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz",
+      "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==",
+      "dev": true,
+      "requires": {}
+    },
     "eslint-loader": {
       "version": "2.2.1",
       "dev": true,

+ 2 - 0
package.json

@@ -37,12 +37,14 @@
     "@babel/core": "^7.16.7",
     "@babel/eslint-parser": "^7.16.5",
     "@babel/preset-env": "^7.16.8",
+    "@rushstack/eslint-patch": "^1.1.0",
     "@vue/cli-plugin-babel": "~4.5.15",
     "@vue/cli-plugin-eslint": "~4.5.15",
     "@vue/cli-plugin-router": "~4.5.15",
     "@vue/cli-plugin-unit-jest": "^4.5.15",
     "@vue/cli-plugin-vuex": "~4.5.15",
     "@vue/cli-service": "~4.5.15",
+    "@vue/eslint-config-prettier": "^7.0.0",
     "@vue/test-utils": "^1.3.0",
     "babel-jest": "^27.4.6",
     "babel-loader": "^8.2.3",

+ 1 - 3
src/common/show_file/index.vue

@@ -1,8 +1,6 @@
 <template>
   <el-dialog class="show-file" :visible="dialogVisibleShowFile" width="900px" @close="dialogShowFileClose">
-    <div slot="title">
-      {{ $t('Key322') }}【{{ fileName }}】
-    </div>
+    <div slot="title">{{ $t('Key322') }}【{{ fileName }}】</div>
 
     <template v-if="fileType === 'pdf'">
       <pdf v-for="i in numPages" :key="i" :src="pdfSrc" :page="i" />

+ 1 - 1
src/components/course/CompletionView.vue

@@ -1,7 +1,7 @@
 <template>
   <el-dialog :visible="dialogVisible" :width="dialogWidth" @close="dialogClose">
     <div class="completion">
-      <img src="../../assets/course_details/courseware.png">
+      <img src="../../assets/course_details/courseware.png" />
       <div class="completion-info">
         <div>{{ material_name }}</div>
         <div>

+ 1 - 1
src/components/payment/Audit.vue

@@ -33,7 +33,7 @@
     </div>
     <div class="submitBtn">
       <div class="text">
-        <img src="../../assets/course_details/auditimg.png" alt="">
+        <img src="../../assets/course_details/auditimg.png" alt="" />
         {{ $t('Key56') }}
       </div>
       <button @click="buy">

+ 1 - 3
src/components/select/SelectTemplate.vue

@@ -30,9 +30,7 @@
     >
       <el-table-column prop="name" :label="$t('Key191')" width="320" />
       <el-table-column :label="$t('Key250')">
-        <template slot-scope="{ row }">
-          <i class="el-icon-date" /> {{ row.begin_date }} - {{ row.end_date }}
-        </template>
+        <template slot-scope="{ row }"> <i class="el-icon-date" /> {{ row.begin_date }} - {{ row.end_date }} </template>
       </el-table-column>
     </el-table>
 

+ 4 - 4
src/layouts/components/LayoutHeader.vue

@@ -35,21 +35,21 @@
             class="headPhoto"
             :src="userMessage.image_url ? userMessage.image_url : require('../../assets/login/Group3214.png')"
             alt="head portrait"
-          >
+          />
           <span class="real_name">{{ userMessage.user_real_name }}</span>
         </span>
         <el-dropdown-menu slot="dropdown" class="user-menu">
           <el-dropdown-item @click.native="goPersonal">
-            <img src="../../assets/login/project7.png"><span>{{ $t('Key8') }}</span>
+            <img src="../../assets/login/project7.png" /><span>{{ $t('Key8') }}</span>
           </el-dropdown-item>
           <el-dropdown-item @click.native="QuitLogin">
-            <img src="../../assets/login/Frame77.png"><span>{{ $t('Key39') }}</span>
+            <img src="../../assets/login/Frame77.png" /><span>{{ $t('Key39') }}</span>
           </el-dropdown-item>
         </el-dropdown-menu>
       </el-dropdown>
       <!-- 消息 铃铛图片 -->
       <div class="message" @click="goPersonal">
-        <img src="../../assets/login/Vector.png">
+        <img src="../../assets/login/Vector.png" />
         <span v-show="isNotRead" class="redDot" />
       </div>
     </div>

+ 9 - 9
src/views/course_details/index.vue

@@ -96,7 +96,7 @@
           <div class="moreList">
             <div v-for="(item, i) in CourseData.book_list" :key="i" class="moreOne">
               <div>
-                <img :src="item.book_picture_url" alt="">
+                <img :src="item.book_picture_url" alt="" />
               </div>
               <div class="text">
                 <p class="p1">
@@ -125,7 +125,7 @@
           <div class="moreList teacherList">
             <div v-for="(item, i) in CourseData.teacher_list" :key="i" class="moreOne">
               <div>
-                <img :src="item.teacher_image_url" alt="">
+                <img :src="item.teacher_image_url" alt="" />
               </div>
               <div class="text">
                 <p class="p1">
@@ -148,9 +148,7 @@
                   <span>{{ i + 1 }}.</span>
                   <span>{{ item.name }}</span>
                 </div>
-                <div class="courseOne-time">
-                  {{ item.begin_time }} ~ {{ item.end_time }}
-                </div>
+                <div class="courseOne-time">{{ item.begin_time }} ~ {{ item.end_time }}</div>
               </div>
             </div>
             <div class="course-content">
@@ -165,7 +163,7 @@
                           ? require('../../assets/course_details/open1.png')
                           : require('../../assets/course_details/open2.png')
                       "
-                    >
+                    />
                   </div>
                   <div class="courseContent">
                     <template v-for="li in courseContentList">
@@ -197,7 +195,7 @@
                                     :key="courseware_i"
                                     class="btn"
                                   >
-                                    <img src="../../assets/course_details/file.png" alt="">
+                                    <img src="../../assets/course_details/file.png" alt="" />
                                     <span> {{ courseware.courseware_name }} </span>
                                   </div>
                                 </div>
@@ -210,7 +208,7 @@
                                     :key="accessory_i"
                                     class="btn"
                                   >
-                                    <img src="../../assets/course_details/fileType1.png" alt="">
+                                    <img src="../../assets/course_details/fileType1.png" alt="" />
                                     <span> {{ accessory.file_name }} </span>
                                   </div>
                                 </div>
@@ -346,7 +344,9 @@ export default {
     },
     goBook(book_id) {
       if (!this.is_buy) {
-        window.location.href = `/GCLS-Book/#/GoodsDetail?goods_id=${book_id}&goods_type=101&invok_module=${this.invok_module ? this.invok_module : 'GCLS-Learn'}`;
+        window.location.href = `/GCLS-Book/#/GoodsDetail?goods_id=${book_id}&goods_type=101&invok_module=${
+          this.invok_module ? this.invok_module : 'GCLS-Learn'
+        }`;
       }
     },
 

+ 1 - 3
src/views/live/student/audit.vue

@@ -3,9 +3,7 @@
     <!--顶部-->
     <div class="group-top">
       <div class="live-title">
-        <div class="live-title-name">
-          {{ roomInfo.cs_item_name }} {{ roomInfo.task_name }}
-        </div>
+        <div class="live-title-name">{{ roomInfo.cs_item_name }} {{ roomInfo.task_name }}</div>
         <div>
           <el-button @click="exitRoom">
             {{ $t('Key459') }}

+ 1 - 3
src/views/live/student/group.vue

@@ -3,9 +3,7 @@
     <!--顶部-->
     <div class="group-top">
       <div class="live-title">
-        <div class="live-title-name">
-          {{ roomInfo.cs_item_name }} {{ roomInfo.task_name }}
-        </div>
+        <div class="live-title-name">{{ roomInfo.cs_item_name }} {{ roomInfo.task_name }}</div>
         <div />
       </div>
       <div class="live-course-name">

+ 1 - 3
src/views/live/student/index.vue

@@ -26,9 +26,7 @@
         <div v-show="callLoading" class="loading">
           <div class="loading-wrapper">
             <el-avatar icon="el-icon-user" :src="roomInfo.teacher_image_url" />
-            <p class="loading-title">
-              {{ roomInfo.teacher_name }}{{ $t('Key461') }}
-            </p>
+            <p class="loading-title">{{ roomInfo.teacher_name }}{{ $t('Key461') }}</p>
             <div>
               <el-button type="danger" circle @click="handsDown">
                 <svg-icon icon-class="hang-up" />

+ 1 - 3
src/views/live/teacher/group.vue

@@ -3,9 +3,7 @@
     <!--顶部-->
     <div class="live-top">
       <div class="live-title">
-        <div class="live-title-name">
-          {{ roomInfo.cs_item_name }} {{ roomInfo.task_name }}
-        </div>
+        <div class="live-title-name">{{ roomInfo.cs_item_name }} {{ roomInfo.task_name }}</div>
         <div>
           <el-button @click="stopGroup">
             {{ $t('Key404') }}

+ 2 - 4
src/views/live/teacher/index.vue

@@ -32,9 +32,7 @@
         <div v-show="callLoading" class="loading">
           <div class="loading-wrapper">
             <el-avatar icon="el-icon-user" :src="connectStudent.student_image_url" />
-            <p class="loading-title">
-              {{ $t('Key420') }}【{{ connectStudent.student_name }}】,{{ $t('Key421') }}...
-            </p>
+            <p class="loading-title">{{ $t('Key420') }}【{{ connectStudent.student_name }}】,{{ $t('Key421') }}...</p>
             <div>
               <el-button type="danger" circle @click="handsDown">
                 <svg-icon icon-class="hang-up" />
@@ -133,7 +131,7 @@
           <div class="chat-top">
             <span>{{ $t('Key409') }}</span>
             <span class="chat-bans" @click="chatBans">
-              <input type="checkbox" :checked="isAllowChat" class="allow-chat">
+              <input type="checkbox" :checked="isAllowChat" class="allow-chat" />
               <span>{{ $t('Key423') }}</span>
             </span>
           </div>

+ 2 - 2
src/views/main/components/MonthlyCalendar.vue

@@ -32,8 +32,8 @@
               isCurMonth && focusDate === day ? 'active' : '',
               `${month < 10 ? '0' : ''}${month}-${day < 10 ? '0' : ''}${day}` in taskDailyDistribution
                 ? taskDailyClass.get(
-                  taskDailyDistribution[`${month < 10 ? '0' : ''}${month}-${day < 10 ? '0' : ''}${day}`]
-                )
+                    taskDailyDistribution[`${month < 10 ? '0' : ''}${month}-${day < 10 ? '0' : ''}${day}`]
+                  )
                 : ''
             ]"
             @click="selectDate(day, isCurMonth)"

+ 1 - 3
src/views/main/curricula_list/student.vue

@@ -50,9 +50,7 @@
           <el-table-column prop="course_name" :label="$t('Key203')" width="300" />
           <el-table-column label="课程教师" prop="teacher_name_desc" width="360" />
           <el-table-column :label="$t('Key250')" width="280">
-            <template slot-scope="{ row }">
-              <i class="el-icon-date" /> {{ row.date_space_view_text }}
-            </template>
+            <template slot-scope="{ row }"> <i class="el-icon-date" /> {{ row.date_space_view_text }} </template>
           </el-table-column>
           <el-table-column label="完成状态" width="140">
             <template slot-scope="{ row }">

+ 3 - 2
src/views/task_details/ShowCourseware.vue

@@ -68,8 +68,9 @@ export default {
         this.$nextTick(() => {
           let offsetWidth = document.querySelector('div.Big-Book-preview').offsetWidth;
           let transform = document.querySelector('div.Big-Book-preview').style.transform;
-          document.querySelector('button.full-screen').style.left =
-            `${offsetWidth * Number(transform.slice(6, -1)) - 130}px`;
+          document.querySelector('button.full-screen').style.left = `${
+            offsetWidth * Number(transform.slice(6, -1)) - 130
+          }px`;
         });
         return;
       }

+ 1 - 4
src/views/task_details/TaskTop.vue

@@ -63,10 +63,7 @@ export default {
   },
   created() {
     this.updateWordPack({
-      word_key_list: [
-        'Key309',
-        'Key274'
-      ]
+      word_key_list: ['Key309', 'Key274']
     });
   },
   methods: {

+ 3 - 4
src/views/task_details/student/index.vue

@@ -3,14 +3,13 @@
     <task-top :item-info="itemInfo" @viewFile="viewFile" />
 
     <div class="task-detail-main">
-      <div class="time-type">
-        {{ $t(timeType) }} {{ name }}
-      </div>
+      <div class="time-type">{{ $t(timeType) }} {{ name }}</div>
       <div class="time-interval">
         {{ time_space_view_txt }}
       </div>
       <div class="task-require">
-        <span class="label">{{ $t('Key326') }}</span>{{ content }}
+        <span class="label">{{ $t('Key326') }}</span>
+        {{ content }}
       </div>
       <div class="task-courseware">
         <span class="label">{{ $t('Key312') }}</span>

+ 1 - 5
src/views/teacher/create_course/step_table/CourseInfo.vue

@@ -60,11 +60,7 @@
         </el-form-item>
 
         <el-form-item :label="$t('Key254')">
-          <el-input
-            v-model="form.student_count_max"
-            class="student-count"
-            oninput="value=value.replace(/[^\d]/g,'')"
-          />
+          <el-input v-model="form.student_count_max" class="student-count" oninput="value=value.replace(/[^\d]/g,'')" />
           <el-checkbox v-model="form.is_auto_close">
             {{ $t('Key266') }}
           </el-checkbox>

+ 23 - 29
src/views/teacher/create_course/step_table/CreateTask.vue

@@ -10,16 +10,12 @@
         <div class="name">
           {{ name }}
         </div>
-        <div class="date">
-          {{ begin_date }}<span>-</span>{{ end_date }}
-        </div>
+        <div class="date">{{ begin_date }}<span>-</span>{{ end_date }}</div>
       </div>
     </div>
     <!-- 按钮 -->
     <div class="task-button">
-      <el-button class="prev-step" @click="preStep">
-        <i class="el-icon-back" />{{ $t('Key275') }}
-      </el-button>
+      <el-button class="prev-step" @click="preStep"> <i class="el-icon-back" />{{ $t('Key275') }} </el-button>
       <el-button @click="$router.push(closeLink)">
         {{ $t('Key246') }}
       </el-button>
@@ -41,10 +37,12 @@
               <i class="el-icon-more" />
               <el-dropdown-menu slot="dropdown">
                 <el-dropdown-item class="dropdown-menu" :command="{ id: item.id, type: 'edit' }">
-                  <span>{{ $t('Key123') }}</span><svg-icon icon-class="edit" />
+                  <span>{{ $t('Key123') }}</span
+                  ><svg-icon icon-class="edit" />
                 </el-dropdown-item>
                 <el-dropdown-item class="dropdown-menu" :command="{ id: item.id, type: 'delete' }">
-                  <span>{{ $t('Key172') }}</span><svg-icon icon-class="delete" />
+                  <span>{{ $t('Key172') }}</span
+                  ><svg-icon icon-class="delete" />
                 </el-dropdown-item>
               </el-dropdown-menu>
             </el-dropdown>
@@ -89,9 +87,7 @@
                   <el-collapse-item>
                     <template slot="title">
                       <div class="card-title">
-                        <div class="name">
-                          {{ i + 1 }}. {{ item.name }}
-                        </div>
+                        <div class="name">{{ i + 1 }}. {{ item.name }}</div>
                         <div class="info">
                           {{ item.time_space_view_txt }}
                           <!-- 任务下拉框 -->
@@ -102,13 +98,15 @@
                                 class="dropdown-menu"
                                 :command="{ id: item.id, type: 'edit', time_type: 0 }"
                               >
-                                <span>{{ $t('Key123') }}</span><svg-icon icon-class="edit" />
+                                <span>{{ $t('Key123') }}</span
+                                ><svg-icon icon-class="edit" />
                               </el-dropdown-item>
                               <el-dropdown-item
                                 class="dropdown-menu"
                                 :command="{ id: item.id, type: 'delete', time_type: 0 }"
                               >
-                                <span>{{ $t('Key172') }}</span><svg-icon icon-class="delete" />
+                                <span>{{ $t('Key172') }}</span
+                                ><svg-icon icon-class="delete" />
                               </el-dropdown-item>
                             </el-dropdown-menu>
                           </el-dropdown>
@@ -143,9 +141,7 @@
                   </el-collapse-item>
                 </el-collapse>
               </el-card>
-              <el-button @click="newTask(0)">
-                <i class="el-icon-plus" /> {{ $t('Key273') }}
-              </el-button>
+              <el-button @click="newTask(0)"> <i class="el-icon-plus" /> {{ $t('Key273') }} </el-button>
             </div>
           </div>
           <!-- 课中任务 -->
@@ -160,9 +156,7 @@
                   <el-collapse-item>
                     <template slot="title">
                       <div class="card-title">
-                        <div class="name">
-                          {{ itemInfoBox.pre_task_list.length + i + 1 }}. {{ item.name }}
-                        </div>
+                        <div class="name">{{ itemInfoBox.pre_task_list.length + i + 1 }}. {{ item.name }}</div>
                         <div class="info">
                           {{ item.time_space_view_txt }}
                           <el-dropdown placement="bottom" @command="handleTask">
@@ -172,13 +166,15 @@
                                 class="dropdown-menu"
                                 :command="{ id: item.id, type: 'edit', time_type: 1 }"
                               >
-                                <span>{{ $t('Key123') }}</span><svg-icon icon-class="edit" />
+                                <span>{{ $t('Key123') }}</span
+                                ><svg-icon icon-class="edit" />
                               </el-dropdown-item>
                               <el-dropdown-item
                                 class="dropdown-menu"
                                 :command="{ id: item.id, type: 'delete', time_type: 1 }"
                               >
-                                <span>{{ $t('Key172') }}</span><svg-icon icon-class="delete" />
+                                <span>{{ $t('Key172') }}</span
+                                ><svg-icon icon-class="delete" />
                               </el-dropdown-item>
                             </el-dropdown-menu>
                           </el-dropdown>
@@ -213,9 +209,7 @@
                   </el-collapse-item>
                 </el-collapse>
               </el-card>
-              <el-button @click="newTask(1)">
-                <i class="el-icon-plus" /> {{ $t('Key273') }}
-              </el-button>
+              <el-button @click="newTask(1)"> <i class="el-icon-plus" /> {{ $t('Key273') }} </el-button>
             </div>
           </div>
           <!-- 课后任务 -->
@@ -243,13 +237,15 @@
                                 class="dropdown-menu"
                                 :command="{ id: item.id, type: 'edit', time_type: 2 }"
                               >
-                                <span>{{ $t('Key123') }}</span><svg-icon icon-class="edit" />
+                                <span>{{ $t('Key123') }}</span
+                                ><svg-icon icon-class="edit" />
                               </el-dropdown-item>
                               <el-dropdown-item
                                 class="dropdown-menu"
                                 :command="{ id: item.id, type: 'delete', time_type: 2 }"
                               >
-                                <span>{{ $t('Key172') }}</span><svg-icon icon-class="delete" />
+                                <span>{{ $t('Key172') }}</span
+                                ><svg-icon icon-class="delete" />
                               </el-dropdown-item>
                             </el-dropdown-menu>
                           </el-dropdown>
@@ -284,9 +280,7 @@
                   </el-collapse-item>
                 </el-collapse>
               </el-card>
-              <el-button @click="newTask(2)">
-                <i class="el-icon-plus" /> {{ $t('Key273') }}
-              </el-button>
+              <el-button @click="newTask(2)"> <i class="el-icon-plus" /> {{ $t('Key273') }} </el-button>
             </div>
           </div>
         </div>

+ 8 - 12
src/views/teacher/create_course/step_table/NewTask.vue

@@ -96,9 +96,7 @@
           <div v-if="form.teaching_type === 10" class="task-template">
             <el-form :model="liveForm" label-width="100px" label-position="left">
               <el-form-item :label="$t('Key312')">
-                <el-button @click="dialogVisible = true">
-                  <i class="el-icon-plus" /> {{ $t('Key373') }}
-                </el-button>
+                <el-button @click="dialogVisible = true"> <i class="el-icon-plus" /> {{ $t('Key373') }} </el-button>
                 <div>
                   <el-tag
                     v-for="(item, i) in liveForm.coursewareInfo"
@@ -152,9 +150,7 @@
           <div v-else-if="form.teaching_type === 11" class="task-template">
             <el-form :model="courseForm" label-width="100px" label-position="left">
               <el-form-item :label="$t('Key312')">
-                <el-button @click="dialogVisible = true">
-                  <i class="el-icon-plus" /> {{ $t('Key373') }}
-                </el-button>
+                <el-button @click="dialogVisible = true"> <i class="el-icon-plus" /> {{ $t('Key373') }} </el-button>
                 <div>
                   <el-tag
                     v-for="(item, i) in courseForm.coursewareInfo"
@@ -177,10 +173,10 @@
 
               <el-form-item :label="$t('Key381')">
                 <el-radio v-model="courseForm.is_enable_message" :label="true">
-                  {{ $t("Key245") }}
+                  {{ $t('Key245') }}
                 </el-radio>
                 <el-radio v-model="courseForm.is_enable_message" :label="false">
-                  {{ $t("Key246") }}
+                  {{ $t('Key246') }}
                 </el-radio>
               </el-form-item>
             </el-form>
@@ -206,19 +202,19 @@
 
               <el-form-item :label="$t('Key330')">
                 <el-radio v-model="basicForm.is_enable_homework" :label="true">
-                  {{ $t("Key245") }}
+                  {{ $t('Key245') }}
                 </el-radio>
                 <el-radio v-model="basicForm.is_enable_homework" :label="false">
-                  {{ $t("Key246") }}
+                  {{ $t('Key246') }}
                 </el-radio>
               </el-form-item>
 
               <el-form-item :label="$t('Key381')">
                 <el-radio v-model="basicForm.is_enable_message" :label="true">
-                  {{ $t("Key245") }}
+                  {{ $t('Key245') }}
                 </el-radio>
                 <el-radio v-model="basicForm.is_enable_message" :label="false">
-                  {{ $t("Key246") }}
+                  {{ $t('Key246') }}
                 </el-radio>
               </el-form-item>
             </el-form>

+ 1 - 3
src/views/teacher/student_list/index.vue

@@ -34,9 +34,7 @@
             </template>
           </el-table-column>
           <el-table-column prop="age" width="120">
-            <template slot-scope="scope">
-              {{ scope.row.age }}岁
-            </template>
+            <template slot-scope="scope"> {{ scope.row.age }}岁 </template>
           </el-table-column>
           <el-table-column prop="org_name" width="280" />
           <el-table-column prop="country_name" width="180" />