chore(docs): cleanup connection line example
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { VueFlow } from '@vue-flow/core'
|
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
import { VueFlow } from '@vue-flow/core'
|
||||||
import CustomConnectionLine from './CustomConnectionLine.vue'
|
import CustomConnectionLine from './CustomConnectionLine.vue'
|
||||||
|
|
||||||
const elements = ref([
|
const nodes = ref([
|
||||||
{
|
{
|
||||||
id: '1',
|
id: '1',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
@@ -14,7 +14,7 @@ const elements = ref([
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VueFlow v-model="elements">
|
<VueFlow :nodes="nodes">
|
||||||
<template #connection-line="{ sourceX, sourceY, targetX, targetY }">
|
<template #connection-line="{ sourceX, sourceY, targetX, targetY }">
|
||||||
<CustomConnectionLine :source-x="sourceX" :source-y="sourceY" :target-x="targetX" :target-y="targetY" />
|
<CustomConnectionLine :source-x="sourceX" :source-y="sourceY" :target-x="targetX" :target-y="targetY" />
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user