From ee4134914916afeca33a0fe6da7fff76d74d7e63 Mon Sep 17 00:00:00 2001 From: undefined Date: Tue, 14 Jan 2025 18:10:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8B=96=E6=8B=BD=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E9=A1=B5=E9=9D=A2=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../editor/src/layouts/page-bar/PageBarScrollContainer.vue | 2 +- packages/utils/src/index.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/editor/src/layouts/page-bar/PageBarScrollContainer.vue b/packages/editor/src/layouts/page-bar/PageBarScrollContainer.vue index f9056008..4f27fe23 100644 --- a/packages/editor/src/layouts/page-bar/PageBarScrollContainer.vue +++ b/packages/editor/src/layouts/page-bar/PageBarScrollContainer.vue @@ -137,7 +137,7 @@ watch( let beforeDragList: Id[] = []; const options = { ...{ - dataIdAttr: 'page-id', // 获取排序后的数据 + dataIdAttr: 'data-page-id', // 获取排序后的数据 onStart: async (event: SortableEvent) => { if (typeof props.pageBarSortOptions?.beforeStart === 'function') { await props.pageBarSortOptions.beforeStart(event, sortable); diff --git a/packages/utils/src/index.ts b/packages/utils/src/index.ts index 0a44b016..68038c84 100644 --- a/packages/utils/src/index.ts +++ b/packages/utils/src/index.ts @@ -279,6 +279,9 @@ export const getDepNodeIds = (dataSourceDeps: DataSourceDeps = {}) => * @param parentId 父节点 id */ export const replaceChildNode = (newNode: MNode, data?: MNode[], parentId?: Id) => { + if(newNode.id==="1"){ + return; + } const path = getNodePath(newNode.id, data); const node = path.pop(); let parent = path.pop();