chore(docs): update custom node example
This commit is contained in:
@@ -5,10 +5,10 @@ const connections = useHandleConnections({
|
|||||||
type: 'target',
|
type: 'target',
|
||||||
})
|
})
|
||||||
|
|
||||||
const data = useNodesData(() => connections.value[0]?.source)
|
const nodesData = useNodesData(() => connections.value[0]?.source)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Handle type="target" :position="Position.Left" :style="{ backgroundColor: data?.color, filter: 'invert(100%)' }" />
|
<Handle type="target" :position="Position.Left" :style="{ backgroundColor: nodesData.data?.color, filter: 'invert(100%)' }" />
|
||||||
{{ data?.isGradient ? 'GRADIENT' : data?.color }}
|
{{ nodesData.data?.isGradient ? 'GRADIENT' : nodesData.data?.color }}
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user