fix
This commit is contained in:
@@ -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<void>((resolve, reject) => {
|
||||
ElMessageBox.confirm(
|
||||
t('flowCanvas.deleteSubordinateCard'),
|
||||
result.length > 1 ? t('flowCanvas.deleteSubordinateCard') : t('flowCanvas.deleteCardConfirm'),
|
||||
'',
|
||||
{
|
||||
confirmButtonText: t('flowCanvas.confirm'),
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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.',
|
||||
|
||||
@@ -179,6 +179,7 @@ export default {
|
||||
edit: '编辑'
|
||||
},
|
||||
flowCanvas: {
|
||||
deleteCardConfirm: '确定要删除该功能卡片吗?',
|
||||
confirm: '确认',
|
||||
cancel: '取消',
|
||||
confirmLeave: '您可能有未保存的更改,确定要离开吗?',
|
||||
|
||||
@@ -237,7 +237,7 @@ defineExpose({push})
|
||||
margin-bottom: 0;
|
||||
}
|
||||
> .icon{
|
||||
margin-right: .4rem;
|
||||
margin-right: .8rem;
|
||||
color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
> span{
|
||||
|
||||
Reference in New Issue
Block a user