@vue/runtime-core 3.5.34 → 3.5.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.34
2
+ * @vue/runtime-core v3.5.36
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1158,19 +1158,18 @@ const TeleportImpl = {
1158
1158
  target,
1159
1159
  props
1160
1160
  } = vnode;
1161
- let shouldRemove = doRemove || !isTeleportDisabled(props);
1161
+ const shouldRemove = doRemove || !isTeleportDisabled(props);
1162
1162
  const pendingMount = pendingMounts.get(vnode);
1163
1163
  if (pendingMount) {
1164
1164
  pendingMount.flags |= 8;
1165
1165
  pendingMounts.delete(vnode);
1166
- shouldRemove = false;
1167
1166
  }
1168
1167
  if (target) {
1169
1168
  hostRemove(targetStart);
1170
1169
  hostRemove(targetAnchor);
1171
1170
  }
1172
1171
  doRemove && hostRemove(anchor);
1173
- if (shapeFlag & 16) {
1172
+ if (!pendingMount && shapeFlag & 16) {
1174
1173
  for (let i = 0; i < children.length; i++) {
1175
1174
  const child = children[i];
1176
1175
  unmount(
@@ -2138,20 +2137,16 @@ function createHydrationFunctions(rendererInternals) {
2138
2137
  slotScopeIds,
2139
2138
  optimized
2140
2139
  );
2141
- let hasWarned = false;
2142
- while (next) {
2143
- if (!isMismatchAllowed(el, 1 /* CHILDREN */)) {
2144
- if (!hasWarned) {
2145
- warn$1(
2146
- `Hydration children mismatch on`,
2147
- el,
2148
- `
2140
+ if (next && !isMismatchAllowed(el, 1 /* CHILDREN */)) {
2141
+ warn$1(
2142
+ `Hydration children mismatch on`,
2143
+ el,
2144
+ `
2149
2145
  Server rendered element contains more child nodes than client vdom.`
2150
- );
2151
- hasWarned = true;
2152
- }
2153
- logMismatchError();
2154
- }
2146
+ );
2147
+ logMismatchError();
2148
+ }
2149
+ while (next) {
2155
2150
  const cur = next;
2156
2151
  next = next.nextSibling;
2157
2152
  remove(cur);
@@ -2214,7 +2209,7 @@ Server rendered element contains more child nodes than client vdom.`
2214
2209
  optimized = optimized || !!parentVNode.dynamicChildren;
2215
2210
  const children = parentVNode.children;
2216
2211
  const l = children.length;
2217
- let hasWarned = false;
2212
+ let hasCheckedMismatch = false;
2218
2213
  for (let i = 0; i < l; i++) {
2219
2214
  const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
2220
2215
  const isText = vnode.type === Text;
@@ -2242,17 +2237,17 @@ Server rendered element contains more child nodes than client vdom.`
2242
2237
  } else if (isText && !vnode.children) {
2243
2238
  insert(vnode.el = createText(""), container);
2244
2239
  } else {
2245
- if (!isMismatchAllowed(container, 1 /* CHILDREN */)) {
2246
- if (!hasWarned) {
2240
+ if (!hasCheckedMismatch) {
2241
+ hasCheckedMismatch = true;
2242
+ if (!isMismatchAllowed(container, 1 /* CHILDREN */)) {
2247
2243
  warn$1(
2248
2244
  `Hydration children mismatch on`,
2249
2245
  container,
2250
2246
  `
2251
2247
  Server rendered element contains fewer child nodes than client vdom.`
2252
2248
  );
2253
- hasWarned = true;
2249
+ logMismatchError();
2254
2250
  }
2255
- logMismatchError();
2256
2251
  }
2257
2252
  patch(
2258
2253
  null,
@@ -2732,13 +2727,21 @@ function defineAsyncComponent(source) {
2732
2727
  const loaded = reactivity.ref(false);
2733
2728
  const error = reactivity.ref();
2734
2729
  const delayed = reactivity.ref(!!delay);
2730
+ let timeoutTimer;
2731
+ let delayTimer;
2732
+ onUnmounted(() => {
2733
+ if (timeoutTimer != null) clearTimeout(timeoutTimer);
2734
+ if (delayTimer != null) clearTimeout(delayTimer);
2735
+ });
2735
2736
  if (delay) {
2736
- setTimeout(() => {
2737
+ delayTimer = setTimeout(() => {
2738
+ if (instance.isUnmounted) return;
2737
2739
  delayed.value = false;
2738
2740
  }, delay);
2739
2741
  }
2740
2742
  if (timeout != null) {
2741
- setTimeout(() => {
2743
+ timeoutTimer = setTimeout(() => {
2744
+ if (instance.isUnmounted) return;
2742
2745
  if (!loaded.value && !error.value) {
2743
2746
  const err = new Error(
2744
2747
  `Async component timed out after ${timeout}ms.`
@@ -2749,11 +2752,16 @@ function defineAsyncComponent(source) {
2749
2752
  }, timeout);
2750
2753
  }
2751
2754
  load().then(() => {
2755
+ if (instance.isUnmounted) return;
2752
2756
  loaded.value = true;
2753
2757
  if (instance.parent && isKeepAlive(instance.parent.vnode)) {
2754
2758
  instance.parent.update();
2755
2759
  }
2756
2760
  }).catch((err) => {
2761
+ if (instance.isUnmounted) {
2762
+ pendingRequest = null;
2763
+ return;
2764
+ }
2757
2765
  onError(err);
2758
2766
  error.value = err;
2759
2767
  });
@@ -4329,13 +4337,20 @@ function useModel(props, name, options = shared.EMPTY_OBJ) {
4329
4337
  return;
4330
4338
  }
4331
4339
  const rawProps = i.vnode.props;
4332
- if (!(rawProps && // check if parent has passed v-model
4333
- (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) {
4340
+ const hasVModel = !!(rawProps && // check if parent has passed v-model
4341
+ (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps));
4342
+ if (!hasVModel) {
4334
4343
  localValue = value;
4335
4344
  trigger();
4336
4345
  }
4337
4346
  i.emit(`update:${name}`, emittedValue);
4338
- if (shared.hasChanged(value, emittedValue) && shared.hasChanged(value, prevSetValue) && !shared.hasChanged(emittedValue, prevEmittedValue)) {
4347
+ if (shared.hasChanged(value, prevSetValue) && (shared.hasChanged(value, emittedValue) && !shared.hasChanged(emittedValue, prevEmittedValue) || // #13524: browsers differ in when they flush microtasks between
4348
+ // event listeners. If a v-model listener emits an intermediate value
4349
+ // and a following listener restores the model to its previous prop
4350
+ // value before parent updates are flushed, the parent render can be
4351
+ // deduped as having no prop change. Force a local update so DOM state
4352
+ // such as an input's value is synchronized back to the current model.
4353
+ hasVModel && prevSetValue !== shared.EMPTY_OBJ && !shared.hasChanged(emittedValue, localValue))) {
4339
4354
  trigger();
4340
4355
  }
4341
4356
  prevSetValue = value;
@@ -6531,9 +6546,13 @@ function baseCreateRenderer(options, createHydrationFns) {
6531
6546
  const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
6532
6547
  if (needTransition2) {
6533
6548
  if (moveType === 0) {
6534
- transition.beforeEnter(el);
6535
- hostInsert(el, container, anchor);
6536
- queuePostRenderEffect(() => transition.enter(el), parentSuspense);
6549
+ if (transition.persisted && !el[leaveCbKey]) {
6550
+ hostInsert(el, container, anchor);
6551
+ } else {
6552
+ transition.beforeEnter(el);
6553
+ hostInsert(el, container, anchor);
6554
+ queuePostRenderEffect(() => transition.enter(el), parentSuspense);
6555
+ }
6537
6556
  } else {
6538
6557
  const { leave, delayLeave, afterLeave } = transition;
6539
6558
  const remove2 = () => {
@@ -6544,16 +6563,21 @@ function baseCreateRenderer(options, createHydrationFns) {
6544
6563
  }
6545
6564
  };
6546
6565
  const performLeave = () => {
6566
+ const wasLeaving = el._isLeaving || !!el[leaveCbKey];
6547
6567
  if (el._isLeaving) {
6548
6568
  el[leaveCbKey](
6549
6569
  true
6550
6570
  /* cancelled */
6551
6571
  );
6552
6572
  }
6553
- leave(el, () => {
6573
+ if (transition.persisted && !wasLeaving) {
6554
6574
  remove2();
6555
- afterLeave && afterLeave();
6556
- });
6575
+ } else {
6576
+ leave(el, () => {
6577
+ remove2();
6578
+ afterLeave && afterLeave();
6579
+ });
6580
+ }
6557
6581
  };
6558
6582
  if (delayLeave) {
6559
6583
  delayLeave(el, remove2, performLeave);
@@ -8560,7 +8584,7 @@ function isMemoSame(cached, memo) {
8560
8584
  return true;
8561
8585
  }
8562
8586
 
8563
- const version = "3.5.34";
8587
+ const version = "3.5.36";
8564
8588
  const warn = warn$1 ;
8565
8589
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8566
8590
  const devtools = devtools$1 ;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.34
2
+ * @vue/runtime-core v3.5.36
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -702,19 +702,18 @@ const TeleportImpl = {
702
702
  target,
703
703
  props
704
704
  } = vnode;
705
- let shouldRemove = doRemove || !isTeleportDisabled(props);
705
+ const shouldRemove = doRemove || !isTeleportDisabled(props);
706
706
  const pendingMount = pendingMounts.get(vnode);
707
707
  if (pendingMount) {
708
708
  pendingMount.flags |= 8;
709
709
  pendingMounts.delete(vnode);
710
- shouldRemove = false;
711
710
  }
712
711
  if (target) {
713
712
  hostRemove(targetStart);
714
713
  hostRemove(targetAnchor);
715
714
  }
716
715
  doRemove && hostRemove(anchor);
717
- if (shapeFlag & 16) {
716
+ if (!pendingMount && shapeFlag & 16) {
718
717
  for (let i = 0; i < children.length; i++) {
719
718
  const child = children[i];
720
719
  unmount(
@@ -1617,10 +1616,10 @@ function createHydrationFunctions(rendererInternals) {
1617
1616
  slotScopeIds,
1618
1617
  optimized
1619
1618
  );
1619
+ if (next && !isMismatchAllowed(el, 1 /* CHILDREN */)) {
1620
+ logMismatchError();
1621
+ }
1620
1622
  while (next) {
1621
- if (!isMismatchAllowed(el, 1 /* CHILDREN */)) {
1622
- logMismatchError();
1623
- }
1624
1623
  const cur = next;
1625
1624
  next = next.nextSibling;
1626
1625
  remove(cur);
@@ -1682,6 +1681,7 @@ function createHydrationFunctions(rendererInternals) {
1682
1681
  optimized = optimized || !!parentVNode.dynamicChildren;
1683
1682
  const children = parentVNode.children;
1684
1683
  const l = children.length;
1684
+ let hasCheckedMismatch = false;
1685
1685
  for (let i = 0; i < l; i++) {
1686
1686
  const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
1687
1687
  const isText = vnode.type === Text;
@@ -1709,8 +1709,11 @@ function createHydrationFunctions(rendererInternals) {
1709
1709
  } else if (isText && !vnode.children) {
1710
1710
  insert(vnode.el = createText(""), container);
1711
1711
  } else {
1712
- if (!isMismatchAllowed(container, 1 /* CHILDREN */)) {
1713
- logMismatchError();
1712
+ if (!hasCheckedMismatch) {
1713
+ hasCheckedMismatch = true;
1714
+ if (!isMismatchAllowed(container, 1 /* CHILDREN */)) {
1715
+ logMismatchError();
1716
+ }
1714
1717
  }
1715
1718
  patch(
1716
1719
  null,
@@ -2045,13 +2048,21 @@ function defineAsyncComponent(source) {
2045
2048
  const loaded = reactivity.ref(false);
2046
2049
  const error = reactivity.ref();
2047
2050
  const delayed = reactivity.ref(!!delay);
2051
+ let timeoutTimer;
2052
+ let delayTimer;
2053
+ onUnmounted(() => {
2054
+ if (timeoutTimer != null) clearTimeout(timeoutTimer);
2055
+ if (delayTimer != null) clearTimeout(delayTimer);
2056
+ });
2048
2057
  if (delay) {
2049
- setTimeout(() => {
2058
+ delayTimer = setTimeout(() => {
2059
+ if (instance.isUnmounted) return;
2050
2060
  delayed.value = false;
2051
2061
  }, delay);
2052
2062
  }
2053
2063
  if (timeout != null) {
2054
- setTimeout(() => {
2064
+ timeoutTimer = setTimeout(() => {
2065
+ if (instance.isUnmounted) return;
2055
2066
  if (!loaded.value && !error.value) {
2056
2067
  const err = new Error(
2057
2068
  `Async component timed out after ${timeout}ms.`
@@ -2062,11 +2073,16 @@ function defineAsyncComponent(source) {
2062
2073
  }, timeout);
2063
2074
  }
2064
2075
  load().then(() => {
2076
+ if (instance.isUnmounted) return;
2065
2077
  loaded.value = true;
2066
2078
  if (instance.parent && isKeepAlive(instance.parent.vnode)) {
2067
2079
  instance.parent.update();
2068
2080
  }
2069
2081
  }).catch((err) => {
2082
+ if (instance.isUnmounted) {
2083
+ pendingRequest = null;
2084
+ return;
2085
+ }
2070
2086
  onError(err);
2071
2087
  error.value = err;
2072
2088
  });
@@ -3304,13 +3320,20 @@ function useModel(props, name, options = shared.EMPTY_OBJ) {
3304
3320
  return;
3305
3321
  }
3306
3322
  const rawProps = i.vnode.props;
3307
- if (!(rawProps && // check if parent has passed v-model
3308
- (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) {
3323
+ const hasVModel = !!(rawProps && // check if parent has passed v-model
3324
+ (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps));
3325
+ if (!hasVModel) {
3309
3326
  localValue = value;
3310
3327
  trigger();
3311
3328
  }
3312
3329
  i.emit(`update:${name}`, emittedValue);
3313
- if (shared.hasChanged(value, emittedValue) && shared.hasChanged(value, prevSetValue) && !shared.hasChanged(emittedValue, prevEmittedValue)) {
3330
+ if (shared.hasChanged(value, prevSetValue) && (shared.hasChanged(value, emittedValue) && !shared.hasChanged(emittedValue, prevEmittedValue) || // #13524: browsers differ in when they flush microtasks between
3331
+ // event listeners. If a v-model listener emits an intermediate value
3332
+ // and a following listener restores the model to its previous prop
3333
+ // value before parent updates are flushed, the parent render can be
3334
+ // deduped as having no prop change. Force a local update so DOM state
3335
+ // such as an input's value is synchronized back to the current model.
3336
+ hasVModel && prevSetValue !== shared.EMPTY_OBJ && !shared.hasChanged(emittedValue, localValue))) {
3314
3337
  trigger();
3315
3338
  }
3316
3339
  prevSetValue = value;
@@ -5067,9 +5090,13 @@ function baseCreateRenderer(options, createHydrationFns) {
5067
5090
  const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
5068
5091
  if (needTransition2) {
5069
5092
  if (moveType === 0) {
5070
- transition.beforeEnter(el);
5071
- hostInsert(el, container, anchor);
5072
- queuePostRenderEffect(() => transition.enter(el), parentSuspense);
5093
+ if (transition.persisted && !el[leaveCbKey]) {
5094
+ hostInsert(el, container, anchor);
5095
+ } else {
5096
+ transition.beforeEnter(el);
5097
+ hostInsert(el, container, anchor);
5098
+ queuePostRenderEffect(() => transition.enter(el), parentSuspense);
5099
+ }
5073
5100
  } else {
5074
5101
  const { leave, delayLeave, afterLeave } = transition;
5075
5102
  const remove2 = () => {
@@ -5080,16 +5107,21 @@ function baseCreateRenderer(options, createHydrationFns) {
5080
5107
  }
5081
5108
  };
5082
5109
  const performLeave = () => {
5110
+ const wasLeaving = el._isLeaving || !!el[leaveCbKey];
5083
5111
  if (el._isLeaving) {
5084
5112
  el[leaveCbKey](
5085
5113
  true
5086
5114
  /* cancelled */
5087
5115
  );
5088
5116
  }
5089
- leave(el, () => {
5117
+ if (transition.persisted && !wasLeaving) {
5090
5118
  remove2();
5091
- afterLeave && afterLeave();
5092
- });
5119
+ } else {
5120
+ leave(el, () => {
5121
+ remove2();
5122
+ afterLeave && afterLeave();
5123
+ });
5124
+ }
5093
5125
  };
5094
5126
  if (delayLeave) {
5095
5127
  delayLeave(el, remove2, performLeave);
@@ -6693,7 +6725,7 @@ function isMemoSame(cached, memo) {
6693
6725
  return true;
6694
6726
  }
6695
6727
 
6696
- const version = "3.5.34";
6728
+ const version = "3.5.36";
6697
6729
  const warn$1 = shared.NOOP;
6698
6730
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
6699
6731
  const devtools = void 0;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.34
2
+ * @vue/runtime-core v3.5.36
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1161,19 +1161,18 @@ const TeleportImpl = {
1161
1161
  target,
1162
1162
  props
1163
1163
  } = vnode;
1164
- let shouldRemove = doRemove || !isTeleportDisabled(props);
1164
+ const shouldRemove = doRemove || !isTeleportDisabled(props);
1165
1165
  const pendingMount = pendingMounts.get(vnode);
1166
1166
  if (pendingMount) {
1167
1167
  pendingMount.flags |= 8;
1168
1168
  pendingMounts.delete(vnode);
1169
- shouldRemove = false;
1170
1169
  }
1171
1170
  if (target) {
1172
1171
  hostRemove(targetStart);
1173
1172
  hostRemove(targetAnchor);
1174
1173
  }
1175
1174
  doRemove && hostRemove(anchor);
1176
- if (shapeFlag & 16) {
1175
+ if (!pendingMount && shapeFlag & 16) {
1177
1176
  for (let i = 0; i < children.length; i++) {
1178
1177
  const child = children[i];
1179
1178
  unmount(
@@ -2142,20 +2141,16 @@ function createHydrationFunctions(rendererInternals) {
2142
2141
  slotScopeIds,
2143
2142
  optimized
2144
2143
  );
2145
- let hasWarned = false;
2146
- while (next) {
2147
- if (!isMismatchAllowed(el, 1 /* CHILDREN */)) {
2148
- if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && !hasWarned) {
2149
- warn$1(
2150
- `Hydration children mismatch on`,
2151
- el,
2152
- `
2144
+ if (next && !isMismatchAllowed(el, 1 /* CHILDREN */)) {
2145
+ (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(
2146
+ `Hydration children mismatch on`,
2147
+ el,
2148
+ `
2153
2149
  Server rendered element contains more child nodes than client vdom.`
2154
- );
2155
- hasWarned = true;
2156
- }
2157
- logMismatchError();
2158
- }
2150
+ );
2151
+ logMismatchError();
2152
+ }
2153
+ while (next) {
2159
2154
  const cur = next;
2160
2155
  next = next.nextSibling;
2161
2156
  remove(cur);
@@ -2229,7 +2224,7 @@ Server rendered element contains more child nodes than client vdom.`
2229
2224
  optimized = optimized || !!parentVNode.dynamicChildren;
2230
2225
  const children = parentVNode.children;
2231
2226
  const l = children.length;
2232
- let hasWarned = false;
2227
+ let hasCheckedMismatch = false;
2233
2228
  for (let i = 0; i < l; i++) {
2234
2229
  const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
2235
2230
  const isText = vnode.type === Text;
@@ -2257,17 +2252,17 @@ Server rendered element contains more child nodes than client vdom.`
2257
2252
  } else if (isText && !vnode.children) {
2258
2253
  insert(vnode.el = createText(""), container);
2259
2254
  } else {
2260
- if (!isMismatchAllowed(container, 1 /* CHILDREN */)) {
2261
- if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && !hasWarned) {
2262
- warn$1(
2255
+ if (!hasCheckedMismatch) {
2256
+ hasCheckedMismatch = true;
2257
+ if (!isMismatchAllowed(container, 1 /* CHILDREN */)) {
2258
+ (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(
2263
2259
  `Hydration children mismatch on`,
2264
2260
  container,
2265
2261
  `
2266
2262
  Server rendered element contains fewer child nodes than client vdom.`
2267
2263
  );
2268
- hasWarned = true;
2264
+ logMismatchError();
2269
2265
  }
2270
- logMismatchError();
2271
2266
  }
2272
2267
  patch(
2273
2268
  null,
@@ -2747,13 +2742,21 @@ function defineAsyncComponent(source) {
2747
2742
  const loaded = ref(false);
2748
2743
  const error = ref();
2749
2744
  const delayed = ref(!!delay);
2745
+ let timeoutTimer;
2746
+ let delayTimer;
2747
+ onUnmounted(() => {
2748
+ if (timeoutTimer != null) clearTimeout(timeoutTimer);
2749
+ if (delayTimer != null) clearTimeout(delayTimer);
2750
+ });
2750
2751
  if (delay) {
2751
- setTimeout(() => {
2752
+ delayTimer = setTimeout(() => {
2753
+ if (instance.isUnmounted) return;
2752
2754
  delayed.value = false;
2753
2755
  }, delay);
2754
2756
  }
2755
2757
  if (timeout != null) {
2756
- setTimeout(() => {
2758
+ timeoutTimer = setTimeout(() => {
2759
+ if (instance.isUnmounted) return;
2757
2760
  if (!loaded.value && !error.value) {
2758
2761
  const err = new Error(
2759
2762
  `Async component timed out after ${timeout}ms.`
@@ -2764,11 +2767,16 @@ function defineAsyncComponent(source) {
2764
2767
  }, timeout);
2765
2768
  }
2766
2769
  load().then(() => {
2770
+ if (instance.isUnmounted) return;
2767
2771
  loaded.value = true;
2768
2772
  if (instance.parent && isKeepAlive(instance.parent.vnode)) {
2769
2773
  instance.parent.update();
2770
2774
  }
2771
2775
  }).catch((err) => {
2776
+ if (instance.isUnmounted) {
2777
+ pendingRequest = null;
2778
+ return;
2779
+ }
2772
2780
  onError(err);
2773
2781
  error.value = err;
2774
2782
  });
@@ -4351,13 +4359,20 @@ function useModel(props, name, options = EMPTY_OBJ) {
4351
4359
  return;
4352
4360
  }
4353
4361
  const rawProps = i.vnode.props;
4354
- if (!(rawProps && // check if parent has passed v-model
4355
- (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) {
4362
+ const hasVModel = !!(rawProps && // check if parent has passed v-model
4363
+ (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps));
4364
+ if (!hasVModel) {
4356
4365
  localValue = value;
4357
4366
  trigger();
4358
4367
  }
4359
4368
  i.emit(`update:${name}`, emittedValue);
4360
- if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {
4369
+ if (hasChanged(value, prevSetValue) && (hasChanged(value, emittedValue) && !hasChanged(emittedValue, prevEmittedValue) || // #13524: browsers differ in when they flush microtasks between
4370
+ // event listeners. If a v-model listener emits an intermediate value
4371
+ // and a following listener restores the model to its previous prop
4372
+ // value before parent updates are flushed, the parent render can be
4373
+ // deduped as having no prop change. Force a local update so DOM state
4374
+ // such as an input's value is synchronized back to the current model.
4375
+ hasVModel && prevSetValue !== EMPTY_OBJ && !hasChanged(emittedValue, localValue))) {
4361
4376
  trigger();
4362
4377
  }
4363
4378
  prevSetValue = value;
@@ -6591,9 +6606,13 @@ function baseCreateRenderer(options, createHydrationFns) {
6591
6606
  const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
6592
6607
  if (needTransition2) {
6593
6608
  if (moveType === 0) {
6594
- transition.beforeEnter(el);
6595
- hostInsert(el, container, anchor);
6596
- queuePostRenderEffect(() => transition.enter(el), parentSuspense);
6609
+ if (transition.persisted && !el[leaveCbKey]) {
6610
+ hostInsert(el, container, anchor);
6611
+ } else {
6612
+ transition.beforeEnter(el);
6613
+ hostInsert(el, container, anchor);
6614
+ queuePostRenderEffect(() => transition.enter(el), parentSuspense);
6615
+ }
6597
6616
  } else {
6598
6617
  const { leave, delayLeave, afterLeave } = transition;
6599
6618
  const remove2 = () => {
@@ -6604,16 +6623,21 @@ function baseCreateRenderer(options, createHydrationFns) {
6604
6623
  }
6605
6624
  };
6606
6625
  const performLeave = () => {
6626
+ const wasLeaving = el._isLeaving || !!el[leaveCbKey];
6607
6627
  if (el._isLeaving) {
6608
6628
  el[leaveCbKey](
6609
6629
  true
6610
6630
  /* cancelled */
6611
6631
  );
6612
6632
  }
6613
- leave(el, () => {
6633
+ if (transition.persisted && !wasLeaving) {
6614
6634
  remove2();
6615
- afterLeave && afterLeave();
6616
- });
6635
+ } else {
6636
+ leave(el, () => {
6637
+ remove2();
6638
+ afterLeave && afterLeave();
6639
+ });
6640
+ }
6617
6641
  };
6618
6642
  if (delayLeave) {
6619
6643
  delayLeave(el, remove2, performLeave);
@@ -8634,7 +8658,7 @@ function isMemoSame(cached, memo) {
8634
8658
  return true;
8635
8659
  }
8636
8660
 
8637
- const version = "3.5.34";
8661
+ const version = "3.5.36";
8638
8662
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
8639
8663
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8640
8664
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/runtime-core",
3
- "version": "3.5.34",
3
+ "version": "3.5.36",
4
4
  "description": "@vue/runtime-core",
5
5
  "main": "index.js",
6
6
  "module": "dist/runtime-core.esm-bundler.js",
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
48
48
  "dependencies": {
49
- "@vue/shared": "3.5.34",
50
- "@vue/reactivity": "3.5.34"
49
+ "@vue/shared": "3.5.36",
50
+ "@vue/reactivity": "3.5.36"
51
51
  }
52
52
  }