From f3335e01ea71614db9fa6aedf1d35e1202c3b12f Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 11 八月 2022 15:46:26 +0800
Subject: [PATCH] 修改登陆时传PC参数

---
 src/utils/global.js |   27 +++++++++++++++++++++++++--
 1 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/src/utils/global.js b/src/utils/global.js
index 19231f3..9470685 100644
--- a/src/utils/global.js
+++ b/src/utils/global.js
@@ -8,7 +8,8 @@
 // 澶勭悊琛ㄥご鍗曞厓鏍兼牱寮�
 export function headerCellStyle() {
   const option = {
-    background: '#eee', padding: '0'
+    // background: '#a7a7a7', padding: '0'
+    background: '#f8f8fa', padding: '0', color: '#000', fontWeight: 500
   }
   return option
 }
@@ -16,13 +17,15 @@
 // 澶勭悊琛ㄦ牸鍗曞厓鏍兼牱寮�
 export function cellStyle() {
   const option = {
+    // padding: '5px 0'
     padding: '5px 0'
+
   }
   return option
 }
 
 // 鏃堕棿澶勭悊鍑芥暟
-export function handleDatatime(value) {
+export function handleDatetime(value) {
   const data = new Date(value)
   const month = data.getMonth() < 9 ? '0' + (data.getMonth() + 1) : data.getMonth() + 1
   const date = data.getDate() <= 9 ? '0' + data.getDate() : data.getDate()
@@ -36,3 +39,23 @@
     return { RightCode: res.data[0], numvalue: res.data[1] }
   }
 }
+
+// 閫掑綊娓呴櫎鏁扮粍姣忎釜鍏冪礌涓嬬殑children涓虹┖鐨勬暟缁�
+const clearAllChildren = (items, childrenName = 'children') => {
+  for (let i = 0; i < items.length; i++) {
+    const item = items[i]
+    // 褰撳墠瀵硅薄瀛樺湪children
+    if (item && item[childrenName]) {
+      // children涓虹┖鏁扮粍鏃跺垹闄�
+      if (item[childrenName].length === 0) {
+        delete item[childrenName]
+      } else {
+        // 閫掑綊褰撳墠children鏁扮粍
+        clearAllChildren(item[childrenName], childrenName)
+      }
+    }
+  }
+  return items
+}
+
+export default clearAllChildren

--
Gitblit v1.9.3