From 295f1f8affdfe2eab4eaddf4c92e53418b83baff Mon Sep 17 00:00:00 2001 From: fanxb Date: Thu, 13 Feb 2020 11:10:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E6=8B=96=E6=8B=BD?= =?UTF-8?q?=E6=9C=AA=E5=B1=95=E5=BC=80=E6=96=87=E4=BB=B6=E5=A4=B9=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E7=82=B9=E5=87=BB=E5=B1=95=E5=BC=80=E6=97=A0=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/util/cacheUtil.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/front/src/util/cacheUtil.js b/front/src/util/cacheUtil.js index e9d62db..b48ee38 100644 --- a/front/src/util/cacheUtil.js +++ b/front/src/util/cacheUtil.js @@ -177,9 +177,9 @@ export async function moveNode(info) { if (body.sourcePath !== body.targetPath) { let keys = Object.keys(data); //旧路径 - let oldPath = body.sourcePath + current.bookmarkId; + let oldPath = body.sourcePath + "." + current.bookmarkId; //新路径 - let newPath = body.targetPath + current.bookmarkId; + let newPath = body.targetPath + "." + current.bookmarkId; keys.forEach(item => { if (!item.startsWith(oldPath)) { return; @@ -187,6 +187,7 @@ export async function moveNode(info) { let newPathStr = item.replace(oldPath, newPath); let list = data[item]; delete data[item]; + data[newPathStr] = list; list.forEach(item1 => (item1.path = newPathStr)); }); }