fix(用例脑图): 未规划节点下不可添加模块节点

This commit is contained in:
baiqi 2024-08-15 11:19:57 +08:00 committed by 刘瑞斌
parent c8930f6d6b
commit 6dc2581360
1 changed files with 6 additions and 0 deletions

View File

@ -569,6 +569,12 @@ export default function useMinderBaseApi({ hasEditPermission }: { hasEditPermiss
return true;
}
if (node.data?.resource?.includes(moduleTag)) {
if (node.data?.id === 'root') {
// 未规划节点下只能粘贴用例
if (!nodes.every((e) => e.data?.resource?.includes(caseTag))) {
return true;
}
}
// NONE 虚拟模块下,只能粘贴模块
if (node.data?.id === 'NONE' && nodes.every((e) => e.data?.resource?.includes(moduleTag))) {
return false;