Ver Fonte

修改 输入长度控制 及头部问题

秦鹏 há 3 anos atrás
pai
commit
519b897c9e

+ 1 - 0
src/components/Header.vue

@@ -91,6 +91,7 @@ import {
 import { setI18nLang } from "@/utils/i18n";
 import { getConfig } from "@/utils/auth";
 import { saveSession, getSession, removeSession } from "@/utils/role";
+import { updateWordPack } from "@/utils/i18n";
 
 export default {
   name: "LayoutHeader",

+ 16 - 14
src/components/teacher-dev/HeaderOne.vue

@@ -1,19 +1,14 @@
 <template>
   <div class="HeaderOne">
     <div>
-      <span
-        :class="[language_type == 'AR' ? 'albbefor' : 'befor']"
-        @click="backHome"
-      >
+      <span :class="[language_type == 'AR' ? 'albbefor' : 'befor']" @click="backHome">
         <img src="../../assets/teacherdev/Frame3.png" alt="" />
       </span>
       <template v-if="allList">
         <span>
           <img src="../../assets/teacherdev/Frame2759.png" alt="" />
         </span>
-        <span class="text" @click="back">
-          <!-- 全部列表 -->{{ this.$t("Key572") }}
-        </span>
+        <span class="text" @click="back"> <!-- 全部列表 -->{{ this.$t("Key572") }} </span>
       </template>
       <span>
         <img src="../../assets/teacherdev/Frame2759.png" alt="" />
@@ -22,19 +17,17 @@
     </div>
     <div>
       <div class="seek" @keyup="keyDownSeekData">
-        <input
+        <el-input
           type="text"
           name=""
           id=""
           :placeholder="$t('Key43')"
           v-model="SeekName"
           @change="SeekName = SeekName.trim()"
+          maxlength="50"
+          show-word-limit
         />
-        <img
-          @click="gotoSeekResult"
-          src="../../assets/teacherdev/Group2149.png"
-          alt=""
-        />
+        <img @click="gotoSeekResult" src="../../assets/teacherdev/Group2149.png" alt="" />
       </div>
     </div>
   </div>
@@ -145,7 +138,7 @@ export default {
   padding: 0 120px 0 24px;
   height: 64px;
   background: #fff;
-  :first-child {
+  >:first-child {
     display: flex;
     align-items: center;
     > span {
@@ -209,3 +202,12 @@ export default {
   }
 }
 </style>
+<style lang="scss">
+.seek {
+  .el-input__inner {
+    border: none;
+    height: 38px;
+    padding: 0;
+  }
+}
+</style>

+ 8 - 1
src/views/teacher-dev/index.vue

@@ -24,13 +24,15 @@
         </el-menu>
         <div class="seek" @keyup="keyDownSeekData">
           <!-- 搜索课程 -->
-          <input
+          <el-input
             type="text"
             name=""
             id=""
             :placeholder="$t('Key43')"
             v-model="SeekName"
             @change="SeekName = SeekName.trim()"
+            maxlength="50"
+            show-word-limit
           />
           <img
             @click="gotoSeekResult"
@@ -262,5 +264,10 @@ export default {
   .el-input__prefix {
     color: black;
   }
+  .el-input__inner {
+    border: none;
+    height: 38px;
+    padding: 0;
+  }
 }
 </style>

+ 11 - 16
src/views/teacher-devEntering/creadDocument.vue

@@ -14,12 +14,9 @@
       </div>
       <div class="btn">
         <!-- 完成 -->
-        <el-button
-          @click="submit('form')"
-          style="width: 180px"
-          type="primary"
-          >{{ $t("Key82") }}</el-button
-        >
+        <el-button @click="submit('form')" style="width: 180px" type="primary">{{
+          $t("Key82")
+        }}</el-button>
 
         <el-button @click="preview" style="width: 180px" type="warning">
           <!-- 预览 -->{{ $t("Key144") }}
@@ -44,6 +41,8 @@
               style="width: 500px"
               :placeholder="$t('Key552')"
               @change="form.name = form.name.trim()"
+              maxlength="50"
+              show-word-limit
             ></el-input>
           </el-form-item>
           <!-- 作者 -->
@@ -54,6 +53,8 @@
               style="width: 500px"
               :placeholder="$t('Key553')"
               @change="authorChange"
+              maxlength="20"
+              show-word-limit
             ></el-input>
           </el-form-item>
           <!-- 定价 -->
@@ -87,21 +88,15 @@
           <!-- 下载 -->
           <el-form-item :label="$t('Key242')" prop="download">
             <el-radio-group v-model="form.download">
-              <el-radio label="downloadable">
-                <!-- 开启 -->{{ $t("Key245") }}
-              </el-radio>
+              <el-radio label="downloadable"> <!-- 开启 -->{{ $t("Key245") }} </el-radio>
               <el-radio label="0"> <!-- 关闭 -->{{ $t("Key246") }} </el-radio>
             </el-radio-group>
           </el-form-item>
           <!-- 分类 -->
           <el-form-item :label="$t('Key243')" prop="classify">
             <el-radio-group v-model="form.classify">
-              <el-radio label="TEXTBOOK">
-                <!-- 教辅资料 -->{{ $t("Key554") }}</el-radio
-              >
-              <el-radio label="TEACHING">
-                <!-- 教研资料 -->{{ $t("Key214") }}
-              </el-radio>
+              <el-radio label="TEXTBOOK"> <!-- 教辅资料 -->{{ $t("Key554") }}</el-radio>
+              <el-radio label="TEACHING"> <!-- 教研资料 -->{{ $t("Key214") }} </el-radio>
               <el-radio label="TOOLBOOK">
                 <!-- 工具书 -->
                 {{ $t("Key555") }}
@@ -506,4 +501,4 @@ export default {
     }
   }
 }
-</style>
+</style>

+ 22 - 27
src/views/teacher-devEntering/index.vue

@@ -5,16 +5,14 @@
     <Nav />
     <div class="top">
       <div class="seek" @keydown="downSeekdata">
-        <input
+        <el-input
           v-model="keyWord"
           @change="keyWord = keyWord.trim()"
           :placeholder="$t('Key46')"
+          maxlength="50"
+          show-word-limit
         />
-        <img
-          @click="seekData"
-          src="../../assets/teacherdev/Group2149.png"
-          alt=""
-        />
+        <img @click="seekData" src="../../assets/teacherdev/Group2149.png" alt="" />
       </div>
       <div class="btn">
         <!-- <el-button type="primary">批量上传</el-button> -->
@@ -38,11 +36,7 @@
     <div class="table" v-loading="loading">
       <el-table :data="tableData.data" stripe style="width: 100%">
         <!-- 文档名称 -->
-        <el-table-column
-          :label="$t('Key548')"
-          prop="name"
-          width="300"
-        ></el-table-column>
+        <el-table-column :label="$t('Key548')" prop="name" width="300"></el-table-column>
         <!-- label="文档类型" -->
         <el-table-column
           :label="$t('Key549')"
@@ -73,11 +67,9 @@
         <el-table-column :label="$t('Key166')" prop>
           <template slot-scope="scope">
             <!-- 编辑 -->
-            <el-button
-              @click="handleEdit(scope.row, scope.$index)"
-              type="text"
-              >{{ $t("Key123") }}</el-button
-            >
+            <el-button @click="handleEdit(scope.row, scope.$index)" type="text">{{
+              $t("Key123")
+            }}</el-button>
             <!-- 删除 -->
             <el-button @click="handleDel(scope.row)" type="text">{{
               $t("Key172")
@@ -87,12 +79,9 @@
               $t("Key232")
             }}</el-button>
             <!-- 上架 -->
-            <el-button
-              v-if="scope.row.status != 4"
-              @click="up(scope.row)"
-              type="text"
-              >{{ $t("Key125") }}</el-button
-            >
+            <el-button v-if="scope.row.status != 4" @click="up(scope.row)" type="text">{{
+              $t("Key125")
+            }}</el-button>
             <!-- 下架 -->
             <el-button
               v-if="scope.row.status != 3"
@@ -152,9 +141,7 @@ export default {
   methods: {
     // 生成优惠码
     handleDiscount(row) {
-      this.$router.push(
-        "/discountCodeList?bookId=" + row.id + "&goods_type=" + 401
-      );
+      this.$router.push("/discountCodeList?bookId=" + row.id + "&goods_type=" + 401);
     },
     // 批量上传
     changeFillId(file, fileList) {
@@ -390,7 +377,6 @@ export default {
         "Key588",
         "Key590",
         "Key501",
-
       ],
     });
     this.isData = true;
@@ -479,4 +465,13 @@ export default {
     margin-top: 50px;
   }
 }
-</style>
+</style>
+<style lang="scss">
+.seek {
+  .el-input__inner {
+    border: none;
+    height: 38px;
+    padding: 0;
+  }
+}
+</style>