SanHQin пре 5 месеци
родитељ
комит
37dfa90c43
5 измењених фајлова са 26 додато и 8 уклоњено
  1. 7 7
      src/components/pages/knowledge/index.vue
  2. 3 0
      src/lang/cn.json
  3. 3 0
      src/lang/en.json
  4. 3 0
      src/lang/hk.json
  5. 10 1
      src/main.js

+ 7 - 7
src/components/pages/knowledge/index.vue

@@ -3,11 +3,11 @@
     <div class="l_type_box" v-loading="isLoading">
       <div class="header">
         <img style="width: 35px;margin-right: 10px;" src="../../../assets/knowledge.png" alt="">
-        <span class="title">我的知识库</span>
+        <span class="title">我的知识库{{ lang.test }}</span>
       </div>
 
       <div class="nav">
-        
+
         <div class="nav_b" v-for="(item, index) in typeArray" :key="index">
           <div class="nav_box" style="display: flex;justify-content: space-between;"
            :class="{ open: item.open, active2: pid.split('/')[0] == item.id }"
@@ -52,8 +52,8 @@
 
 
       <folder :userid="userid" :typeArray="typeArray" :pid="pid" @checkType="checkType" v-show="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">
       </fileBox>
 
@@ -113,7 +113,7 @@ export default {
         const _pid = this.pid.split('/');
         let array = [];
         let index = this.typeArray.findIndex(item => item.id === _pid[0]);
-        
+
         if (index !== -1) {
             array.push({ name: this.typeArray[index].name, id: this.typeArray[index].id });
         }
@@ -125,7 +125,7 @@ export default {
             }
         }
         console.log(array);
-        
+
         return array;
       };
     },
@@ -208,7 +208,7 @@ export default {
       this.$forceUpdate()
     },
     checkType2(is, pid) {
-      if(!is){  
+      if(!is){
         this.folderid = ""
         this.checkType(pid)
       }

+ 3 - 0
src/lang/cn.json

@@ -0,0 +1,3 @@
+{
+  "test":"测试"
+}

+ 3 - 0
src/lang/en.json

@@ -0,0 +1,3 @@
+{
+  "test":"Test"
+}

+ 3 - 0
src/lang/hk.json

@@ -0,0 +1,3 @@
+{
+  "test":"测试"
+}

+ 10 - 1
src/main.js

@@ -23,14 +23,23 @@ import './assets/css/dialog.css'
 import './assets/css/markdownCss.css'
 import './assets/css/markdownCssCopy.css'
 
+import cn from './lang/cn.json'
+import hk from './lang/hk.json'
+import en from './lang/en.json'
+
 import VueAudio from 'vue-audio-better'
 
 const echarts = require('echarts');
 
-//
+let lang = new Object();
+
+lang = cn;
+
 Vue.use(VideoPlayer).use(VueAudio).use(VueCookies).use(Viewer).use(hevueImgPreview, {
     clickMaskCLose: true
 })
+
+Vue.prototype.lang = lang;
 Vue.config.productionTip = false
 Vue.prototype.$store = store; // 将store实例挂在vue原型上
 Vue.prototype.ajax = ajax