diff --git a/src/container/VueFlow/VueFlow.vue b/src/container/VueFlow/VueFlow.vue index 8e1c5728..bbd652da 100644 --- a/src/container/VueFlow/VueFlow.vue +++ b/src/container/VueFlow/VueFlow.vue @@ -166,8 +166,9 @@ invoke(async () => { ) }) -throttledWatch(elements, store.setElements, { flush: 'post', throttle: 10 }) -throttledWatch(store.elements, (val) => (elements.value = val), { flush: 'post', throttle: 10 }) +watch(elements, store.setElements, { flush: 'post' }) +watch(() => elements.value.length, () => store.setElements(elements.value), { flush: 'post' }) +watch(store.elements, (val) => (elements.value = val), { flush: 'post' }) const transitionName = computed(() => { let name = ''