CzRger 3 settimane fa
parent
commit
b250f907cc
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      src/views/study/subject/question/index.vue

+ 3 - 3
src/views/study/subject/question/index.vue

@@ -188,10 +188,10 @@ const initTree = () => {
     level: 1,
   })
     .then(({ data }: any) => {
-      const deep = (arr, parent = []) => {
+      const deep = (arr, parent: any = []) => {
         return arr.map((v) => {
-          v.total = 0
-          v.totalMake = 0
+          v.total = v.size || 0
+          v.totalMake = v.questionSize || 0
           if (v.children?.length > 0) {
             v.children = deep(v.children, [...parent, v])
           } else {