examples: move current examples into examples/vite

This commit is contained in:
bcakmakoglu
2022-06-03 19:32:46 +02:00
committed by Braks
parent c6bda81c5e
commit 8dd7c79700
68 changed files with 94 additions and 91 deletions
+23
View File
@@ -0,0 +1,23 @@
<script lang="ts" setup>
const onDragStart = (event: DragEvent, nodeType: string) => {
if (event.dataTransfer) {
event.dataTransfer.setData('application/vueflow', nodeType)
event.dataTransfer.effectAllowed = 'move'
}
}
</script>
<template>
<aside>
<div class="description">You can drag these nodes to the pane on the left.</div>
<div class="vue-flow__node-input" :draggable="true" @dragstart="(event: DragEvent) => onDragStart(event, 'input')">
Input Node
</div>
<div class="vue-flow__node-default" :draggable="true" @dragstart="(event: DragEvent) => onDragStart(event, 'default')">
Default Node
</div>
<div class="vue-flow__node-output" :draggable="true" @dragstart="(event: DragEvent) => onDragStart(event, 'output')">
Output Node
</div>
</aside>
</template>