chore(store): pass vueflow id to scope on each call
This commit is contained in:
@@ -124,7 +124,6 @@ export default (options?: FlowProps): VueFlowStore => {
|
|||||||
vueFlow = storage.create(name, options)
|
vueFlow = storage.create(name, options)
|
||||||
|
|
||||||
if (scope) {
|
if (scope) {
|
||||||
scope.vueFlowId = name
|
|
||||||
isParentScope = true
|
isParentScope = true
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -141,6 +140,8 @@ export default (options?: FlowProps): VueFlowStore => {
|
|||||||
if (scope) {
|
if (scope) {
|
||||||
provide(VueFlow, vueFlow)
|
provide(VueFlow, vueFlow)
|
||||||
|
|
||||||
|
scope.vueFlowId = vueFlow.id
|
||||||
|
|
||||||
if (isParentScope) {
|
if (isParentScope) {
|
||||||
// dispose of state values and storage entry
|
// dispose of state values and storage entry
|
||||||
tryOnScopeDispose(() => {
|
tryOnScopeDispose(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user