fix(flow): store & usevueflow types

This commit is contained in:
Braks
2022-04-04 21:42:48 +02:00
parent c1594b0071
commit 95bc46e616
9 changed files with 25 additions and 32 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ const {
nodes: storedNodes,
edges: storedEdges,
} = useVueFlow(props)
useHooks(hooks.value, emit)
useHooks(emit, hooks.value)
const { modelValue, nodes, edges } = useVModels(props, emit)
onMounted(() => useWatch({ modelValue, nodes, edges }, props, store))
+2 -2
View File
@@ -1,5 +1,5 @@
import { Ref } from 'vue'
import { FlowProps, FlowStore, Node, Edge, Elements } from '~/types'
import { FlowProps, Store, Node, Edge, Elements } from '~/types'
const isDef = <T>(val: T): val is NonNullable<T> => typeof val !== 'undefined'
export default (
@@ -13,7 +13,7 @@ export default (
edges?: Ref<Edge[] | undefined>
},
props: FlowProps,
store: FlowStore,
store: Store,
) => {
const scope = getCurrentScope()
scope?.run(() => {