diff --git a/docs/src/guide/edge.md b/docs/src/guide/edge.md index 7c12cdf9..ef13110b 100644 --- a/docs/src/guide/edge.md +++ b/docs/src/guide/edge.md @@ -433,8 +433,13 @@ Edge-types are determined from your edges' definitions. ::: code-group -```js [edges ] +```vue [App.vue ] + + + ``` ```vue [CustomEdge.vue ] + + ``` ```vue [CustomEdge.vue ] @@ -532,6 +613,7 @@ import { BezierEdge } from '@vue-flow/core'; import { CustomData } from './edges' +// props were passed from the slot using `v-bind="customEdgeProps"` const props = defineProps>(); console.log(props.data.hello) // 'world' @@ -676,8 +758,7 @@ But you may wish to expand on these features or implement your business logic in ## Edge Events Vue Flow provides two main ways of listening to edge events, -either by using `useVueFlow` to bind listeners to the event handlers -or by using binding listeners to the `` component. +either by using `useVueFlow` to bind listeners to the event handlers or by binding them to the `` component. ::: code-group diff --git a/docs/src/guide/node.md b/docs/src/guide/node.md index 2c8f3726..1e242b39 100644 --- a/docs/src/guide/node.md +++ b/docs/src/guide/node.md @@ -474,8 +474,13 @@ Node-types are determined from your nodes' definitions. ::: code-group -```js [nodes ] +```vue{11-12,18-19} [App.vue ] + + + ``` ```vue [CustomNode.vue ] @@ -511,9 +530,14 @@ const props = defineProps(['label']) ``` -```ts [nodes ] +```vue{30-31,37-38,45-47} [App.vue ] + + + ``` ```vue [CustomNode.vue ] @@ -566,6 +603,7 @@ import { Position } from '@vue-flow/core' import { CustomData, CustomEvents } from './nodes' +// props were passed from the slot using `v-bind="customNodeProps"` const props = defineProps>() console.log(props.data.hello) // 'world' @@ -691,8 +729,7 @@ But you may wish to expand on these features or implement your business logic in ## [Node Events](/typedocs/types/NodeEventsHandler) Vue Flow provides two main ways of listening to node events, -either by using `useVueFlow` to bind listeners to the event handlers -or by using binding listeners to the `` component. +either by using `useVueFlow` to bind listeners to the event handlers or by binding them to the `` component. ::: code-group