vue 3.4.32 → 3.4.34

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.
package/dist/vue.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * vue v3.4.32
2
+ * vue v3.4.34
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1,5 +1,5 @@
1
1
  /**
2
- * vue v3.4.32
2
+ * vue v3.4.34
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1,5 +1,5 @@
1
1
  /**
2
- * vue v3.4.32
2
+ * vue v3.4.34
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -7572,7 +7572,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
7572
7572
  const modifiers = getModelModifiers(props, name);
7573
7573
  const res = customRef((track, trigger) => {
7574
7574
  let localValue;
7575
- let prevSetValue;
7575
+ let prevSetValue = EMPTY_OBJ;
7576
7576
  let prevEmittedValue;
7577
7577
  watchSyncEffect(() => {
7578
7578
  const propValue = props[name];
@@ -7587,7 +7587,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
7587
7587
  return options.get ? options.get(localValue) : localValue;
7588
7588
  },
7589
7589
  set(value) {
7590
- if (!hasChanged(value, localValue)) {
7590
+ if (!hasChanged(value, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
7591
7591
  return;
7592
7592
  }
7593
7593
  const rawProps = i.vnode.props;
@@ -7598,7 +7598,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
7598
7598
  }
7599
7599
  const emittedValue = options.set ? options.set(value) : value;
7600
7600
  i.emit(`update:${name}`, emittedValue);
7601
- if (value !== emittedValue && value !== prevSetValue && emittedValue === prevEmittedValue) {
7601
+ if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {
7602
7602
  trigger();
7603
7603
  }
7604
7604
  prevSetValue = value;
@@ -9074,8 +9074,6 @@ function createComponentInstance(vnode, parent, suspense) {
9074
9074
  refs: EMPTY_OBJ,
9075
9075
  setupState: EMPTY_OBJ,
9076
9076
  setupContext: null,
9077
- attrsProxy: null,
9078
- slotsProxy: null,
9079
9077
  // suspense related
9080
9078
  suspense,
9081
9079
  suspenseId: suspense ? suspense.pendingId : 0,
@@ -9332,12 +9330,12 @@ const attrsProxyHandlers = {
9332
9330
  }
9333
9331
  } ;
9334
9332
  function getSlotsProxy(instance) {
9335
- return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, {
9333
+ return new Proxy(instance.slots, {
9336
9334
  get(target, key) {
9337
9335
  track(instance, "get", "$slots");
9338
9336
  return target[key];
9339
9337
  }
9340
- }));
9338
+ });
9341
9339
  }
9342
9340
  function createSetupContext(instance) {
9343
9341
  const expose = (exposed) => {
@@ -9365,12 +9363,13 @@ function createSetupContext(instance) {
9365
9363
  };
9366
9364
  {
9367
9365
  let attrsProxy;
9366
+ let slotsProxy;
9368
9367
  return Object.freeze({
9369
9368
  get attrs() {
9370
9369
  return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
9371
9370
  },
9372
9371
  get slots() {
9373
- return getSlotsProxy(instance);
9372
+ return slotsProxy || (slotsProxy = getSlotsProxy(instance));
9374
9373
  },
9375
9374
  get emit() {
9376
9375
  return (event, ...args) => instance.emit(event, ...args);
@@ -9663,7 +9662,7 @@ function isMemoSame(cached, memo) {
9663
9662
  return true;
9664
9663
  }
9665
9664
 
9666
- const version = "3.4.32";
9665
+ const version = "3.4.34";
9667
9666
  const warn = warn$1 ;
9668
9667
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
9669
9668
  const devtools = devtools$1 ;
@@ -10253,7 +10252,7 @@ function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBoolean
10253
10252
 
10254
10253
  function patchDOMProp(el, key, value, parentComponent) {
10255
10254
  if (key === "innerHTML" || key === "textContent") {
10256
- if (value === null) return;
10255
+ if (value == null) return;
10257
10256
  el[key] = value;
10258
10257
  return;
10259
10258
  }