-
-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
192b154
commit 09cea83
Showing
2 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ type Scope = (EffectScope & { vueFlowId: string }) | undefined | |
* | ||
* @public | ||
* @returns a vue flow store instance | ||
* @param idOrOpts - id of the store instance or options to create a new store instance | ||
* @param idOrOpts - id of the store instance or options to pass to the store instance (options are deprecated!) | ||
Check warning on line 22 in packages/core/src/composables/useVueFlow.ts GitHub Actions / build-and-test (ubuntu-latest, 18)
|
||
*/ | ||
export function useVueFlow(id?: string): VueFlowStore | ||
export function useVueFlow(options?: FlowOptions): VueFlowStore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<script lang="ts" setup> | ||
import { inject } from 'vue' | ||
import { useVueFlow } from '../composables' | ||
import { VueFlow } from './' | ||
const hasInjection = inject(VueFlow, null) | ||
if (!hasInjection) { | ||
useVueFlow() | ||
} | ||
</script> | ||
|
||
<template> | ||
<slot /> | ||
</template> |