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(
|
||||
|
||||
Reference in New Issue
Block a user