@vue/compat 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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.4.32
2
+ * @vue/compat v3.4.34
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -5179,7 +5179,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
5179
5179
  return vm;
5180
5180
  }
5181
5181
  }
5182
- Vue.version = `2.6.14-compat:${"3.4.32"}`;
5182
+ Vue.version = `2.6.14-compat:${"3.4.34"}`;
5183
5183
  Vue.config = singletonApp.config;
5184
5184
  Vue.use = (plugin, ...options) => {
5185
5185
  if (plugin && isFunction(plugin.install)) {
@@ -9153,7 +9153,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
9153
9153
  const modifiers = getModelModifiers(props, name);
9154
9154
  const res = customRef((track, trigger) => {
9155
9155
  let localValue;
9156
- let prevSetValue;
9156
+ let prevSetValue = EMPTY_OBJ;
9157
9157
  let prevEmittedValue;
9158
9158
  watchSyncEffect(() => {
9159
9159
  const propValue = props[name];
@@ -9168,7 +9168,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
9168
9168
  return options.get ? options.get(localValue) : localValue;
9169
9169
  },
9170
9170
  set(value) {
9171
- if (!hasChanged(value, localValue)) {
9171
+ if (!hasChanged(value, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
9172
9172
  return;
9173
9173
  }
9174
9174
  const rawProps = i.vnode.props;
@@ -9179,7 +9179,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
9179
9179
  }
9180
9180
  const emittedValue = options.set ? options.set(value) : value;
9181
9181
  i.emit(`update:${name}`, emittedValue);
9182
- if (value !== emittedValue && value !== prevSetValue && emittedValue === prevEmittedValue) {
9182
+ if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {
9183
9183
  trigger();
9184
9184
  }
9185
9185
  prevSetValue = value;
@@ -10750,8 +10750,6 @@ function createComponentInstance(vnode, parent, suspense) {
10750
10750
  refs: EMPTY_OBJ,
10751
10751
  setupState: EMPTY_OBJ,
10752
10752
  setupContext: null,
10753
- attrsProxy: null,
10754
- slotsProxy: null,
10755
10753
  // suspense related
10756
10754
  suspense,
10757
10755
  suspenseId: suspense ? suspense.pendingId : 0,
@@ -11020,12 +11018,12 @@ const attrsProxyHandlers = {
11020
11018
  }
11021
11019
  } ;
11022
11020
  function getSlotsProxy(instance) {
11023
- return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, {
11021
+ return new Proxy(instance.slots, {
11024
11022
  get(target, key) {
11025
11023
  track(instance, "get", "$slots");
11026
11024
  return target[key];
11027
11025
  }
11028
- }));
11026
+ });
11029
11027
  }
11030
11028
  function createSetupContext(instance) {
11031
11029
  const expose = (exposed) => {
@@ -11053,12 +11051,13 @@ function createSetupContext(instance) {
11053
11051
  };
11054
11052
  {
11055
11053
  let attrsProxy;
11054
+ let slotsProxy;
11056
11055
  return Object.freeze({
11057
11056
  get attrs() {
11058
11057
  return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
11059
11058
  },
11060
11059
  get slots() {
11061
- return getSlotsProxy(instance);
11060
+ return slotsProxy || (slotsProxy = getSlotsProxy(instance));
11062
11061
  },
11063
11062
  get emit() {
11064
11063
  return (event, ...args) => instance.emit(event, ...args);
@@ -11351,7 +11350,7 @@ function isMemoSame(cached, memo) {
11351
11350
  return true;
11352
11351
  }
11353
11352
 
11354
- const version = "3.4.32";
11353
+ const version = "3.4.34";
11355
11354
  const warn = warn$1 ;
11356
11355
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11357
11356
  const devtools = devtools$1 ;
@@ -12013,7 +12012,7 @@ function compatCoerceAttr(el, key, value, instance = null) {
12013
12012
 
12014
12013
  function patchDOMProp(el, key, value, parentComponent) {
12015
12014
  if (key === "innerHTML" || key === "textContent") {
12016
- if (value === null) return;
12015
+ if (value == null) return;
12017
12016
  el[key] = value;
12018
12017
  return;
12019
12018
  }