diff --git a/packages/uni-mp-vue/dist/vue.runtime.esm.js b/packages/uni-mp-vue/dist/vue.runtime.esm.js index b173166a0c562198bb9f123a083cff1b5c7514c7..1d60c615f8d63631fa7f455576dd9bba3950ac19 100644 --- a/packages/uni-mp-vue/dist/vue.runtime.esm.js +++ b/packages/uni-mp-vue/dist/vue.runtime.esm.js @@ -4778,6 +4778,13 @@ function renderComponentRoot(instance) { setCurrentRenderingInstance(prev); return result; } +const updateComponentPreRender = (instance) => { + pauseTracking(); + // props update may have triggered pre-flush watchers. + // flush them before the render update. + flushPreFlushCbs(undefined, instance.update); + resetTracking(); +}; function setupRenderEffect(instance) { const componentUpdateFn = () => { if (!instance.isMounted) { @@ -4787,6 +4794,7 @@ function setupRenderEffect(instance) { // updateComponent const { bu, u } = instance; effect.allowRecurse = false; + updateComponentPreRender(instance); // beforeUpdate hook if (bu) { invokeArrayFns(bu); diff --git a/packages/uni-mp-vue/lib/vue.runtime.esm.js b/packages/uni-mp-vue/lib/vue.runtime.esm.js index 563b3307b83c281c86b51654bde59bebd48ad0b0..3f69827d51b9da9f3ebf7f290d4285965b339e4e 100644 --- a/packages/uni-mp-vue/lib/vue.runtime.esm.js +++ b/packages/uni-mp-vue/lib/vue.runtime.esm.js @@ -4778,6 +4778,13 @@ function renderComponentRoot(instance) { setCurrentRenderingInstance(prev); return result; } +const updateComponentPreRender = (instance) => { + pauseTracking(); + // props update may have triggered pre-flush watchers. + // flush them before the render update. + flushPreFlushCbs(undefined, instance.update); + resetTracking(); +}; function setupRenderEffect(instance) { const componentUpdateFn = () => { if (!instance.isMounted) { @@ -4787,6 +4794,7 @@ function setupRenderEffect(instance) { // updateComponent const { bu, u } = instance; effect.allowRecurse = false; + updateComponentPreRender(instance); // beforeUpdate hook if (bu) { invokeArrayFns(bu);