Преглед изворни кода

知识库添加页数选择

lsc пре 4 месеци
родитељ
комит
9bd9a3ef57
2 измењених фајлова са 14 додато и 5 уклоњено
  1. 11 3
      src/components/pages/knowledge/folder.vue
  2. 3 2
      src/components/pages/knowledge/index.vue

+ 11 - 3
src/components/pages/knowledge/folder.vue

@@ -107,13 +107,15 @@
       </div>
     </div>
     
-    <div class="none_box" v-if="fileArray.length == 0">
+    <div class="none_box" v-if="fileArray.length == 0" 
+      v-loading.body="isLoading && showBool"
+    >
       {{lang.noFolder}}
     </div>
     <div
       class="f_box_file_list"
       v-else-if="stype == '2' && fileArray.length"
-      v-loading.body="isLoading"
+      v-loading.body="isLoading && showBool"
     >
 
     <!-- 切换样式 -->
@@ -231,7 +233,9 @@
         </div>
       
      </div>
-      <div v-else class="list_file_box">
+      <div v-else class="list_file_box"
+        v-loading.body="isLoading && showBool"
+      >
         <el-table
           ref="myTable"
           :data="fileArray"
@@ -499,6 +503,10 @@ export default {
     },
     type: {
       type: String
+    },
+    showBool: {
+      type: Boolean,
+      default: false
     }
   },
   watch: {

+ 3 - 2
src/components/pages/knowledge/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="l_box">
     <div class="l_type_box" v-loading="isLoading">
-      <div class="header">
+      <div class="header" @click="checkType('0')">
         <img style="width: 35px;margin-right: 10px;" src="../../../assets/knowledge.png" alt="">
         <span class="title">{{ lang.myKnowledgeBase }}</span>
       </div>
@@ -51,7 +51,7 @@
       </div>
 
 
-      <folder :userid="userid" :typeArray="typeArray" :pid="pid" @checkType="checkType" v-show="pid.split('/').length == 1 && (barNam ==0 || barNam == 2)" ref="folder"></folder>
+      <folder :userid="userid" :typeArray="typeArray" :pid="pid" @checkType="checkType" v-show="pid.split('/').length == 1 && (barNam ==0 || barNam == 2)" :showBool="pid.split('/').length == 1 && (barNam ==0 || barNam == 2)" ref="folder"></folder>
 
 
       <fileBox :userid="userid" :typeArray="typeArray" :pid="pid" :type='type' ref="fileBox" v-show="pid.split('/').length == 1 && moFolderid && barNam ==1" :moFolderid="moFolderid" :myFolderArray="myFolderArray">
@@ -252,6 +252,7 @@ export default {
   display: flex;
   /* justify-content: space-between; */
   align-items: center;
+  cursor: pointer;
 }
 
 .l_type_box>.header>.title {