Skip to content

Commit 5de83f0

Browse files
committed
fix nodes type for MenuTabEdit
1 parent 7273d6b commit 5de83f0

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

caster-editor/src/components/Menu.vue

+2-3
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,9 @@ import MenuTab from "./MenuTabHeader.vue";
5757
import MenuTabEdit from "./MenuTabEdit.vue";
5858
import MenuTabPlay from "./MenuTabPlay.vue";
5959
import DialogExitGraph from "./DialogExitGraph.vue";
60+
import type { GraphEdit } from "./MenuTabEdit.vue";
6061
61-
export type GraphMenu = Pick<Graph, "name" | "uuid" | "slugName"> & {
62-
nodes: Array<any>;
63-
};
62+
export type GraphMenu = Pick<Graph, "name" | "uuid" | "slugName"> & GraphEdit;
6463
6564
// Props
6665
defineProps<{

caster-editor/src/components/MenuTabEdit.vue

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,17 @@
2121
</template>
2222

2323
<script setup lang="ts">
24-
import type { Graph } from "@/graphql";
24+
import type { Graph, Node } from "@/graphql";
2525
import { useDeleteEdgeMutation, useDeleteNodeMutation } from "@/graphql";
2626
import { useInterfaceStore } from "@/stores/InterfaceStore";
2727
import { ElMessage } from "element-plus";
2828
import { storeToRefs } from "pinia";
2929
import { ref, type Ref } from "vue";
3030
import DialogAddNode from "./DialogAddNode.vue";
3131
32-
export type GraphEdit = Pick<Graph, "uuid" | "nodes">;
32+
export type GraphEdit = Pick<Graph, "uuid"> & {
33+
nodes: Pick<Node, "uuid" | "isEntryNode">[];
34+
};
3335
3436
const props = defineProps<{
3537
graph: GraphEdit;

0 commit comments

Comments
 (0)