feat: implement workspaces

This commit is contained in:
Braks
2022-04-04 21:42:48 +02:00
parent cc96739c38
commit cd817b7f53
153 changed files with 8970 additions and 1191 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { VueFlow, MiniMap, Controls, Background, isNode, useVueFlow, Elements } from '@braks/vue-flow'
import ResizableNode from './ResizableNode.vue'
import { VueFlow, MiniMap, Controls, Background, isNode, useVueFlow, Elements } from '~/index'
const elements = ref<Elements>([
{ id: '1', type: 'input', label: 'Node 1', position: { x: 250, y: 5 } },
@@ -33,7 +33,7 @@ const updatePos = () =>
})
const logToObject = () => console.log(instance.value?.toObject())
const resetTransform = () => elements.value.push({ id: '1234', position: { x: 50, y: 50 }, label: 'Foobar' })
const resetTransform = () => instance.value?.setTransform({ x: 0, y: 0, zoom: 1 })
const toggleclass = () => elements.value.forEach((el) => (el.class = el.class === 'light' ? 'dark' : 'light'))
</script>
<template>
+1 -1
View File
@@ -1,5 +1,5 @@
<script lang="ts">
import { VueFlow, Background, MiniMap, Controls, Elements, FlowEvents, FlowInstance, isNode, addEdge } from '~/index'
import { VueFlow, Background, MiniMap, Controls, Elements, FlowEvents, FlowInstance, isNode, addEdge } from '@braks/vue-flow'
export default defineComponent({
name: 'BasicOptionsAPI',
+1 -1
View File
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { Position, Handle, ValidConnectionFunc } from '~/index'
import { Position, Handle, ValidConnectionFunc } from '@braks/vue-flow'
interface Props {
id: string