修复节点添加和删除时的报错
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<div>
|
||||||
<a-dropdown
|
<a-dropdown
|
||||||
:trigger="['contextmenu']"
|
:trigger="['contextmenu']"
|
||||||
:getPopupContainer="getPopupContainer"
|
:getPopupContainer="getPopupContainer"
|
||||||
@@ -89,6 +90,7 @@
|
|||||||
</a-menu>
|
</a-menu>
|
||||||
</template>
|
</template>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
@@ -99,7 +101,7 @@ import { DeleteOutlined, LinkOutlined, CheckOutlined, SettingOutlined } from '@a
|
|||||||
import type { Graph } from '@antv/x6';
|
import type { Graph } from '@antv/x6';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
import { substring } from '@/utils/strings';
|
import { substring } from '@/utils/strings';
|
||||||
import { getAllBehaviorTreesBySceneId, updateBehaviorTree } from './api';
|
import { updateBehaviorTree } from './api';
|
||||||
import type { BehaviorTree } from '../designer/tree';
|
import type { BehaviorTree } from '../designer/tree';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<div>
|
||||||
<a-dropdown :trigger="['contextmenu']" @openChange="handleVisibleChange">
|
<a-dropdown :trigger="['contextmenu']" @openChange="handleVisibleChange">
|
||||||
|
|
||||||
|
|
||||||
<a-card
|
<a-card
|
||||||
:class="[
|
:class="[
|
||||||
'ks-designer-node',
|
'ks-designer-node',
|
||||||
@@ -10,7 +13,7 @@
|
|||||||
>
|
>
|
||||||
<template #title>
|
<template #title>
|
||||||
<a-space>
|
<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>
|
<span class="ks-designer-node-title">{{ element?.name ?? '-' }}</span>
|
||||||
</a-space>
|
</a-space>
|
||||||
</template>
|
</template>
|
||||||
@@ -44,6 +47,7 @@
|
|||||||
</a-menu>
|
</a-menu>
|
||||||
</template>
|
</template>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
|||||||
Reference in New Issue
Block a user