From 5eeef421749ee327354779710a2a4c0993dacf88 Mon Sep 17 00:00:00 2001 From: aixianling Date: Sat, 28 Jan 2023 18:07:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95git=E6=9C=BA=E5=99=A8?= =?UTF-8?q?=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/lib/js/utils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/lib/js/utils.js b/ui/lib/js/utils.js index 5a02df04..173cb5cb 100644 --- a/ui/lib/js/utils.js +++ b/ui/lib/js/utils.js @@ -48,7 +48,7 @@ const $arr2tree = (list, config = {}) => { if (!!pid && ids.indexOf(pid) > -1) { if (!itemMap[pid]) { itemMap[pid] = { - children: [], + children: [] } } itemMap[pid].children.push(treeItem) @@ -130,6 +130,7 @@ export const $copy = any => { return JSON.parse(JSON.stringify(any)) } else return any } + let debounceWait = null export const $debounce = (fn, wait) => { if (debounceWait !== null) clearTimeout(debounceWait);