lrf402788946 4 năm trước cách đây
mục cha
commit
fe273e91fd
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      app/service/system/dictionary.js

+ 5 - 0
app/service/system/dictionary.js

@@ -56,6 +56,11 @@ class DictionaryService extends CrudService {
     if (dicList && dicList.length > 0) {
       list = await this.toFindChildren(dicList);
     }
+    const { categroy } = condition;
+    if (categroy) {
+      list = _.head(list);
+      list = _.get(list, 'children', []);
+    }
     return list;
   }