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/runtime/react-runtime-help/package.json b/runtime/react-runtime-help/package.json index eac87c9e..61a1b0b2 100644 --- a/runtime/react-runtime-help/package.json +++ b/runtime/react-runtime-help/package.json @@ -1,5 +1,5 @@ { - "version": "0.1.0", + "version": "0.1.1", "name": "@tmagic/react-runtime-help", "type": "module", "sideEffects": false, diff --git a/runtime/react-runtime-help/src/hooks/use-editor-dsl.ts b/runtime/react-runtime-help/src/hooks/use-editor-dsl.ts index 366943e8..b0f3eff3 100644 --- a/runtime/react-runtime-help/src/hooks/use-editor-dsl.ts +++ b/runtime/react-runtime-help/src/hooks/use-editor-dsl.ts @@ -50,7 +50,13 @@ export const useEditorDsl = (app: TMagicApp, renderDom: () => void) => { }, update({ config, root, parentId }: UpdateData) { + if (config.type === 'app') { + this.updateRootConfig?.(config as MApp); + return; + } + const newNode = app?.dataSourceManager?.compiledNode(config, undefined, true) || config; + replaceChildNode(newNode, [root], parentId); updateConfig(cloneDeep(root)); }, diff --git a/runtime/vue-runtime-help/package.json b/runtime/vue-runtime-help/package.json index 1d8854fa..b4c852c5 100644 --- a/runtime/vue-runtime-help/package.json +++ b/runtime/vue-runtime-help/package.json @@ -1,5 +1,5 @@ { - "version": "1.1.4", + "version": "1.1.5", "name": "@tmagic/vue-runtime-help", "type": "module", "sideEffects": false, diff --git a/runtime/vue-runtime-help/src/hooks/use-editor-dsl.ts b/runtime/vue-runtime-help/src/hooks/use-editor-dsl.ts index 0222f75c..9a892b12 100644 --- a/runtime/vue-runtime-help/src/hooks/use-editor-dsl.ts +++ b/runtime/vue-runtime-help/src/hooks/use-editor-dsl.ts @@ -90,7 +90,13 @@ export const useEditorDsl = (app = inject('app'), win = window) => { update({ config, parentId }: UpdateData) { if (!root.value || !app) throw new Error('error'); + if (config.type === 'app') { + this.updateRootConfig?.(config as MApp); + return; + } + const newNode = app.dataSourceManager?.compiledNode(config, undefined, true) || config; + replaceChildNode(reactive(newNode), [root.value], parentId); const nodeInstance = app.getNode(config.id);