diff --git a/frontend/src/components/business/ms-minders/featureCaseMinder/index.vue b/frontend/src/components/business/ms-minders/featureCaseMinder/index.vue index 30390b2309..ad05036c6a 100644 --- a/frontend/src/components/business/ms-minders/featureCaseMinder/index.vue +++ b/frontend/src/components/business/ms-minders/featureCaseMinder/index.vue @@ -16,6 +16,7 @@ :can-show-enter-node="canShowEnterNode" :insert-sibling-menus="insertSiblingMenus" :insert-son-menus="insertSonMenus" + :can-show-more-menu-node-operation="canShowMoreMenuNodeOperation()" :can-show-paste-menu="!stopPaste()" :can-show-more-menu="canShowMoreMenu()" :can-show-priority-menu="canShowPriorityMenu()" @@ -147,6 +148,7 @@ handleContentChange, replaceableTags, priorityDisableCheck, + canShowMoreMenuNodeOperation, } = useMinderBaseApi({ hasEditPermission }); const importJson = ref({ root: {} as MinderJsonNode, diff --git a/frontend/src/components/business/ms-minders/featureCaseMinder/useMinderBaseApi.ts b/frontend/src/components/business/ms-minders/featureCaseMinder/useMinderBaseApi.ts index 51e7078950..c1cd5f7d4e 100644 --- a/frontend/src/components/business/ms-minders/featureCaseMinder/useMinderBaseApi.ts +++ b/frontend/src/components/business/ms-minders/featureCaseMinder/useMinderBaseApi.ts @@ -640,6 +640,24 @@ export default function useMinderBaseApi({ hasEditPermission }: { hasEditPermiss return true; } + /** + * 是否可展示更多菜单节点操作(复制、剪切、粘贴、删除) + */ + function canShowMoreMenuNodeOperation() { + if (window.minder) { + const node: MinderJsonNode = window.minder.getSelectedNode(); + if (node?.data?.id === 'NONE') { + // 虚拟根节点不展示节点操作 + return false; + } + if (node?.data?.resource?.includes(moduleTag) && node?.data?.id === 'root') { + // 根模块节点不展示节点操作 + return false; + } + } + return true; + } + /** * 脑图命令执行前拦截 * @param event 命令执行事件 @@ -732,5 +750,6 @@ export default function useMinderBaseApi({ hasEditPermission }: { hasEditPermiss handleContentChange, replaceableTags, priorityDisableCheck, + canShowMoreMenuNodeOperation, }; }