浏览代码

feat:文件夹请求层数

ananzhusen 1 年之前
父节点
当前提交
948d678a36
共有 1 个文件被更改,包括 5 次插入2 次删除
  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);
     }