diff --git a/src/components/Canvas/FlowCanvas/manager/StateManager.ts b/src/components/Canvas/FlowCanvas/manager/StateManager.ts index 0146a23..5165bb4 100644 --- a/src/components/Canvas/FlowCanvas/manager/StateManager.ts +++ b/src/components/Canvas/FlowCanvas/manager/StateManager.ts @@ -93,7 +93,7 @@ export class StateManager { this.nodes.value.forEach((node, index) => { const superiorID = node.data.superiorID; const isSuperior = this.nodes.value.some((v) => v.id === superiorID) - if (superiorID && isSuperior) { + if (isSuperior) { const source = node.data.superiorID const target = node.id arr.push({ @@ -101,7 +101,7 @@ export class StateManager { source: source, target: target, selectable: false, - visible: (node.data.isActive), + visible: (node.data.type == NODE_DATATYPE.RESULT_IMAGE && node.data.isActive) || node.data.type !== NODE_DATATYPE.RESULT_IMAGE, type: 'default' }) } @@ -148,6 +148,7 @@ export class StateManager { if (node.data.disableDelete) return ElMessage.error(t('flowCanvas.initialNodeProhibited')) const result = [node] + const findChildren = (parentId: string) => { const children = this.nodes.value.filter(item => item.data.superiorID === parentId) children.forEach(child => { @@ -157,11 +158,12 @@ export class StateManager { findChildren(child.id) }) } + findChildren(id) let deletePromise: any = true - if (isElMessageBox && result.length > 1) { + if (isElMessageBox) { deletePromise = await new Promise((resolve, reject) => { ElMessageBox.confirm( - t('flowCanvas.deleteSubordinateCard'), + result.length > 1 ? t('flowCanvas.deleteSubordinateCard') : t('flowCanvas.deleteCardConfirm'), '', { confirmButtonText: t('flowCanvas.confirm'), diff --git a/src/components/Canvas/components/fullscreen-dialog.vue b/src/components/Canvas/components/fullscreen-dialog.vue index 911bb73..f1116dc 100644 --- a/src/components/Canvas/components/fullscreen-dialog.vue +++ b/src/components/Canvas/components/fullscreen-dialog.vue @@ -86,8 +86,8 @@ } } .fullscreen-dialog { - --size: 0.25rem; - --width: 4rem; + --size: 0.125rem; + --width: 2rem; --color: #bfbfbf; background-color: #fffcf4; background-image: repeating-radial-gradient( diff --git a/src/lang/en.ts b/src/lang/en.ts index fa84f6e..f672a9f 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -178,6 +178,7 @@ export default { export: 'Export', }, flowCanvas: { + deleteCardConfirm: 'Are you sure you want to delete this function card?', confirm: 'Confirm', cancel: 'Cancel', confirmLeave: 'Are you sure you want to leave? You may have unsaved changes.', diff --git a/src/lang/zh-cn.ts b/src/lang/zh-cn.ts index 6ed4825..b5bd8f6 100644 --- a/src/lang/zh-cn.ts +++ b/src/lang/zh-cn.ts @@ -179,6 +179,7 @@ export default { edit: '编辑' }, flowCanvas: { + deleteCardConfirm: '确定要删除该功能卡片吗?', confirm: '确认', cancel: '取消', confirmLeave: '您可能有未保存的更改,确定要离开吗?', diff --git a/src/views/home/agent/components/versionTree/tree/view2/index.vue b/src/views/home/agent/components/versionTree/tree/view2/index.vue index 78b80d2..5c45705 100644 --- a/src/views/home/agent/components/versionTree/tree/view2/index.vue +++ b/src/views/home/agent/components/versionTree/tree/view2/index.vue @@ -237,7 +237,7 @@ defineExpose({push}) margin-bottom: 0; } > .icon{ - margin-right: .4rem; + margin-right: .8rem; color: rgba(0, 0, 0, 0.5); } > span{