docs: update examples
This commit is contained in:
@@ -16,8 +16,8 @@ const elements = ref([
|
||||
{ id: 'C', type: 'custom', position: { x: 250, y: 300 }, isValidSourcePos: (connection) => connection.target === 'B' },
|
||||
])
|
||||
|
||||
const onLoad = (flowInstance) => flowInstance.fitView()
|
||||
const onConnectStart = ({ nodeId, handleType }) => console.log('on connect start', { nodeId, handleType })
|
||||
|
||||
const onConnectEnd = (event) => console.log('on connect end', event)
|
||||
|
||||
const onConnect = (params) => {
|
||||
@@ -29,15 +29,16 @@ const onConnect = (params) => {
|
||||
<template>
|
||||
<VueFlow
|
||||
v-model="elements"
|
||||
fit-view-on-init
|
||||
class="validationflow"
|
||||
@connect="onConnect"
|
||||
@pane-ready="onLoad"
|
||||
@connect-start="onConnectStart"
|
||||
@connect-end="onConnectEnd"
|
||||
>
|
||||
<template #node-custominput="props">
|
||||
<CustomInput v-bind="props" />
|
||||
</template>
|
||||
|
||||
<template #node-custom="props">
|
||||
<CustomNode v-bind="props" />
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user