Files
Braks d71de0a92d chore(docs): update example styles (#1469)
* chore(docs): update basic example styles

* chore(docs): update confirm delete example styles

* chore(docs): update dnd example styles

* chore(docs): update hidden example

* chore(docs): update update node example

* chore(docs): update node toolbar example styles

* chore(docs): update transition example styles

* chore(docs): cleanup basic example els

* chore(docs): cleanup examples
2024-06-10 23:51:47 +02:00

48 lines
913 B
Vue

<script setup>
import { ref } from 'vue'
import { VueFlow } from '@vue-flow/core'
import Sidebar from './Sidebar.vue'
import TeleportableNode from './TeleportableNode.vue'
const nodes = ref([
{
id: '1',
type: 'teleportable',
position: { x: 125, y: 0 },
data: { label: 'Click to teleport' },
},
{
id: '2',
type: 'teleportable',
position: { x: 350, y: 200 },
data: { label: 'Click to teleport' },
},
{
id: '3',
type: 'teleportable',
position: { x: 0, y: 200 },
data: { label: 'Click to teleport' },
},
])
const edges = ref([
{
id: 'e1-2',
source: '1',
target: '2',
},
])
</script>
<template>
<div class="teleportflow">
<VueFlow :nodes="nodes" :edges="edges" fit-view-on-init>
<template #node-teleportable="{ id }">
<TeleportableNode :id="id" />
</template>
</VueFlow>
<Sidebar />
</div>
</template>