refactor: use dist pkg for examples

Signed-off-by: bcakmakoglu <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
bcakmakoglu
2022-02-21 20:25:17 +01:00
committed by Braks
parent 8260eabc58
commit 54e8301ddb
37 changed files with 68 additions and 52 deletions
+3 -4
View File
@@ -1,9 +1,7 @@
<script lang="ts" setup>
import ColorSelectorNode from './ColorSelectorNode.vue'
import {
ConnectionMode,
Elements,
FlowElement,
isEdge,
Node,
Position,
@@ -12,7 +10,8 @@ import {
VueFlow,
Controls,
MiniMap,
} from '~/index'
} from '@braks/vue-flow'
import ColorSelectorNode from './ColorSelectorNode.vue'
const elements = ref<Elements>([])
const bgColor = ref('#1A192B')
@@ -31,7 +30,7 @@ const nodeColor = (n: Node): string => {
}
const onChange = (event: Event) => {
elements.value.forEach((e: FlowElement) => {
elements.value.forEach((e) => {
if (isEdge(e) || e.id !== '2') return e
bgColor.value = (event.target as HTMLInputElement).value
})