refactor(flow): export useNodesState and useEdgesState separately from useVueFlow

* bind vueFlow instance to currentInstance when useVueFlow is called multiple times in a single setup call

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-12-20 19:29:52 +01:00
parent 63bf3b3a26
commit 39501d0bb0
7 changed files with 159 additions and 142 deletions
+8
View File
@@ -1,6 +1,14 @@
import { UseVueFlow } from '~/types'
declare module '*.vue' {
import { DefineComponent } from 'vue'
// eslint-disable-next-line @typescript-eslint/ban-types
const component: DefineComponent<{}, {}, any>
export default component
}
declare module '@vue/runtime-core' {
interface ComponentInternalInstance {
vueFlow: UseVueFlow
}
}