修复节点添加和删除时的报错

This commit is contained in:
2026-04-16 12:48:25 +08:00
parent 243a42ca5c
commit 27a5dc8e02
2 changed files with 132 additions and 126 deletions

View File

@@ -1,4 +1,5 @@
<template>
<div>
<a-dropdown
:trigger="['contextmenu']"
:getPopupContainer="getPopupContainer"
@@ -89,6 +90,7 @@
</a-menu>
</template>
</a-dropdown>
</div>
</template>
<script lang="ts">
@@ -99,7 +101,7 @@ import { DeleteOutlined, LinkOutlined, CheckOutlined, SettingOutlined } from '@a
import type { Graph } from '@antv/x6';
import { message } from 'ant-design-vue';
import { substring } from '@/utils/strings';
import { getAllBehaviorTreesBySceneId, updateBehaviorTree } from './api';
import { updateBehaviorTree } from './api';
import type { BehaviorTree } from '../designer/tree';
export default defineComponent({

View File

@@ -1,5 +1,8 @@
<template>
<div>
<a-dropdown :trigger="['contextmenu']" @openChange="handleVisibleChange">
<a-card
:class="[
'ks-designer-node',
@@ -10,7 +13,7 @@
>
<template #title>
<a-space>
<!-- <span class="ks-designer-node-icon"></span>-->
<!-- <span class="ks-designer-node-icon"></span>-->
<span class="ks-designer-node-title">{{ element?.name ?? '-' }}</span>
</a-space>
</template>
@@ -44,6 +47,7 @@
</a-menu>
</template>
</a-dropdown>
</div>
</template>
<script lang="ts">