Переглянути джерело

整理代码与小bug修复

任一存 2 роки тому
батько
коміт
f853e554ac

+ 5 - 2
packages/qjkankan-editor/src/components/crumbs/index.vue

@@ -2,7 +2,7 @@
   <div class="crumbs">
     <ul>
       <li v-if="list[0]">
-        <span class="name" :title="list[0].name" @click="onClickPath(0)">{{list[0].name}}</span>
+        <span class="name" :title="rootName || list[0].name" @click="onClickPath(0)">{{rootName || list[0].name}}</span>
       </li>
       <li v-if="list.length > 3">...</li>
       <li v-if="list.length > 2">
@@ -17,7 +17,10 @@
 
 <script>
 export default {
-  props:['list'],
+  props:[
+    'list',
+    'rootName',
+  ],
   methods: {
     onClickPath(idx) {
       if (idx !== this.list.length - 1) {

+ 6 - 1
packages/qjkankan-editor/src/views/material/audio/index.vue

@@ -1,7 +1,12 @@
 <template>
   <div class="panorama con">
     <div class="top">
-      <crumbs v-if="!lastestUsedSearchKey" :list="folderPath" @click-path="onClickPath" />
+      <crumbs
+        v-if="!lastestUsedSearchKey"
+        :list="folderPath"
+        :rootName="$i18n.t('gather.audio')"
+        @click-path="onClickPath"
+      />
       <div v-if="lastestUsedSearchKey" class="">{{$i18n.t("gather.audio")}}</div>
     </div>
     <div class="second-line">

+ 0 - 1
packages/qjkankan-editor/src/views/material/folderMixinFactory.js

@@ -3,7 +3,6 @@ import RenameFolder from "./popup/RenameFolder";
 import MoveFolder from "./popup/MoveFolder";
 import { nodeIdList2nodeInfoListByNodeTree } from "@/utils/other.js";
 import {
-  getMaterialList,
   getFolderTree,
   createFolder as createFolderApi,
   renameFolder as renameFolderApi,

+ 6 - 2
packages/qjkankan-editor/src/views/material/image/index.vue

@@ -1,7 +1,12 @@
 <template>
   <div class="panorama con">
     <div class="top">
-      <crumbs v-if="!lastestUsedSearchKey" :list="folderPath" @click-path="onClickPath" />
+      <crumbs
+        v-if="!lastestUsedSearchKey"
+        :rootName="$i18n.t('gather.image')"
+        :list="folderPath"
+        @click-path="onClickPath"
+      />
       <div v-if="lastestUsedSearchKey" class="">{{$i18n.t("gather.image")}}</div>
     </div>
     <div class="second-line">
@@ -261,7 +266,6 @@ import {
   uploadMaterial,
   editMaterial,
   delMaterial,
-  delFolder,
   checkUserSize
 } from "@/api";
 

+ 6 - 2
packages/qjkankan-editor/src/views/material/pano/index.vue

@@ -1,7 +1,12 @@
 <template>
   <div class="panorama con">
     <div class="top">
-      <crumbs v-if="!lastestUsedSearchKey" :list="folderPath" @click-path="onClickPath" />
+      <crumbs
+        v-if="!lastestUsedSearchKey"
+        :list="folderPath"
+        :rootName="$i18n.t('gather.pano')"
+        @click-path="onClickPath"
+      />
       <div v-if="lastestUsedSearchKey" class="">{{$i18n.t("gather.pano")}}</div>
     </div>
     <div class="second-line">
@@ -268,7 +273,6 @@ import {
   uploadMaterial,
   editMaterial,
   delMaterial,
-  delFolder,
   uploadCover,
   checkMStatus,
   checkUserSize

+ 6 - 2
packages/qjkankan-editor/src/views/material/video/index.vue

@@ -1,7 +1,12 @@
 <template>
   <div class="panorama con">
     <div class="top">
-      <crumbs v-if="!lastestUsedSearchKey" :list="folderPath" @click-path="onClickPath" />
+      <crumbs
+        v-if="!lastestUsedSearchKey"
+        :list="folderPath"
+        :rootName="$i18n.t('gather.video')"
+        @click-path="onClickPath"
+      />
       <div v-if="lastestUsedSearchKey" class="">{{$i18n.t("gather.video")}}</div>
     </div>
     <div class="second-line">
@@ -264,7 +269,6 @@ import {
   uploadMaterial,
   editMaterial,
   delMaterial,
-  delFolder,
   checkUserSize
 } from "@/api";