File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 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
1919 *
2020 * @public
2121 * @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!)
2323 */
2424export function useVueFlow ( id ?: string ) : VueFlowStore
2525export 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