Przeglądaj źródła

feat:文件夹请求层数

ananzhusen 1 rok temu
rodzic
commit
948d678a36
1 zmienionych plików z 5 dodań i 2 usunięć
  1. 5 2
      src/views/components/Graphics.vue

+ 5 - 2
src/views/components/Graphics.vue

@@ -558,7 +558,10 @@ const getCollectionImageList = async (name?: string, collection?: string) => {
   }
   let list = [];
   for (let i of ret.list) {
-    if (i.fullpath !== fullpath && i.fullpath !== `${fullpath}/默认`) {
+    if (
+      i.fullpath !== `${fullpath}/默认` &&
+      i.fullpath.split('/').length === 4
+    ) {
       //不取当前文件夹
       list.push(i);
     }
@@ -633,7 +636,7 @@ const getImageList = async () => {
   }
   let list = [];
   for (let i of ret.list) {
-    if (i.fullpath !== '/大屏/图片') {
+    if (i.fullpath.split('/').length === 4) {
       //不取当前文件夹
       list.push(i);
     }