Skip to content

Commit

Permalink
fix: common page do not support drag (opentiny#1029)
Browse files Browse the repository at this point in the history
  • Loading branch information
gene9831 authored Jan 13, 2025
1 parent ec976ef commit 9b64bdd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/plugins/page/src/PageTree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
:active="state.currentNodeData.id"
:filter-value="state.pageSearchValue"
:root-id="pageSettingState.ROOT_ID"
:draggable="groupItem.groupId === STATIC_PAGE_GROUP_ID"
@click-row="handleClickRow"
@move-node="handleMoveNode"
>
Expand Down Expand Up @@ -371,7 +372,8 @@ export default {
handleClickRow,
handleMoveNode,
isPageLocked,
handleClickPageSettings
handleClickPageSettings,
STATIC_PAGE_GROUP_ID
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion packages/plugins/page/src/Tree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
]"
:key="node.id"
draggable="true"
:draggable="draggable ? 'true' : undefined"
@dragstart="handleDragStart($event, node)"
@dragover="handleDragOver($event, node)"
@dragenter="handleDragOver($event, node)"
Expand Down Expand Up @@ -68,6 +68,10 @@ const props = defineProps({
rootId: {
type: [String, Number],
default: 'root'
},
draggable: {
type: Boolean,
default: false
}
})
Expand Down

0 comments on commit 9b64bdd

Please sign in to comment.