Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jlpereira committed Dec 18, 2024
1 parent 69a2fc9 commit 5bc75e6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/adapters/makeLead.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export function makeLead(item: any, config: APIConfig): Lead {
text: item.text,
parentId: item.parent_id,
targetId: item.target_id,
targetLabel: item.target_label,
targetType: item.target_type,
position: item.position,
figures: item.figures?.map((item) => makeFigure(item, config)) || []
Expand Down
1 change: 1 addition & 0 deletions src/components/Node.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
</button>

<p>{{ node.text }}</p>
<p v-if="isNaN(node.targetLabel)">{{ node.targetLabel }}</p>
<FigureList :figures="node.figures" />
</div>
<div v-if="node.children.length">
Expand Down
9 changes: 3 additions & 6 deletions src/components/Tree.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
<template>
<ul class="pinpoint-tree">
<li>
<span @click="() => store.setCurrentNode(node.parentId)">
[{{ coupletNumber }}]
<span
@click="() => store.setCurrentNode(node.parentId)"
v-html="node.text"
/>
[id: {{ node.id }}]

<span v-html="node.text"/> <span v-if="isNaN(node.targetLabel)">[{{ node.targetLabel }}]</span>
</span>
<template v-for="id in node.children">
<VTree
v-if="store.state.nodes[id]"
Expand Down
1 change: 1 addition & 0 deletions src/types/Lead.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export type Lead = {
parentId: Number | null
position: Number | null
targetType: String
targetLabel: String
targetId: Number
figures: Figure[]
}

0 comments on commit 5bc75e6

Please sign in to comment.