File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ type Scope = (EffectScope & { vueFlowId: string }) | undefined
19
19
*
20
20
* @public
21
21
* @returns a vue flow store instance
22
- * @param idOrOpts - id of the store instance or options to create a new store instance
22
+ * @param idOrOpts - id of the store instance or options to pass to the store instance (options are deprecated!)
23
23
*/
24
24
export function useVueFlow ( id ?: string ) : VueFlowStore
25
25
export function useVueFlow ( options ?: FlowOptions ) : VueFlowStore
Original file line number Diff line number Diff line change
1
+ <script lang="ts" setup>
2
+ import { inject } from ' vue'
3
+ import { useVueFlow } from ' ../composables'
4
+ import { VueFlow } from ' ./'
5
+
6
+ const hasInjection = inject (VueFlow , null )
7
+
8
+ if (! hasInjection ) {
9
+ useVueFlow ()
10
+ }
11
+ </script >
12
+
13
+ <template >
14
+ <slot />
15
+ </template >
You can’t perform that action at this time.
0 commit comments