From 1d739783b70e11e964d86a882b00c20d2e000997 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期一, 29 八月 2022 10:20:06 +0800
Subject: [PATCH] 1.修改top5从顶部开始排列

---
 src/views/kb/zhkb.vue |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/views/kb/zhkb.vue b/src/views/kb/zhkb.vue
index 9949b6d..3ced825 100644
--- a/src/views/kb/zhkb.vue
+++ b/src/views/kb/zhkb.vue
@@ -690,7 +690,8 @@
           }
           // console.log(res1.data[0].children.length, 9999)
           // console.log(res1.data[0].children, 8888)
-          if (res1.data[0].children.length > 0 && res1.data[0].children.length === count++) {
+          // if (res1.data[0].children.length > 0 && res1.data[0].children.length === count++) {
+          if (res1.data[0].children.length === count++) {
             count = 0
             LineSearchTopLeftData([item]).then(res => {
               res1 = res
@@ -721,7 +722,7 @@
               children: res2.data[0].children ? res2.data[0].children[count] : []
             }
           }
-          if (res2.data[0].children.length > 0 && res2.data[0].children.length === count++) {
+          if (res2.data[0].children.length === count++) {
             count = 0
             LineSearchTopLeftData([item]).then(res => {
               res2 = res
@@ -753,7 +754,7 @@
               children: res3.data[0].children ? res3.data[0].children[count] : []
             }
           }
-          if (res3.data[0].children.length > 0 && res3.data[0].children.length === count++) {
+          if (res3.data[0].children.length === count++) {
             count = 0
             LineSearchTopLeftData([item]).then(res => {
               res3 = res
@@ -784,7 +785,8 @@
               children: res4.data[0].children ? res4.data[0].children[count] : []
             }
           }
-          if (res4.data[0].children > 0 && res4.data[0].children.length === count++) {
+          // if (res4.data[0].children > 0 && res4.data[0].children.length === count++) {
+          if (res4.data[0].children.length === count++) {
             count = 0
             LineSearchTopLeftData([item]).then(res => {
               res4 = res

--
Gitblit v1.9.3