diff --git a/packages/editor/src/layouts/page-bar/PageBarScrollContainer.vue b/packages/editor/src/layouts/page-bar/PageBarScrollContainer.vue index 6324ad44..37d1d139 100644 --- a/packages/editor/src/layouts/page-bar/PageBarScrollContainer.vue +++ b/packages/editor/src/layouts/page-bar/PageBarScrollContainer.vue @@ -136,7 +136,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();