@vue/compat 3.4.8 → 3.4.10
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 +77 -67
- package/dist/vue.cjs.prod.js +56 -51
- package/dist/vue.esm-browser.js +77 -67
- package/dist/vue.esm-browser.prod.js +4 -4
- package/dist/vue.esm-bundler.js +79 -69
- package/dist/vue.global.js +77 -67
- package/dist/vue.global.prod.js +4 -4
- package/dist/vue.runtime.esm-browser.js +77 -67
- package/dist/vue.runtime.esm-browser.prod.js +4 -4
- package/dist/vue.runtime.esm-bundler.js +79 -69
- package/dist/vue.runtime.global.js +77 -67
- package/dist/vue.runtime.global.prod.js +4 -4
- package/package.json +16 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.4.
|
|
2
|
+
* @vue/compat v3.4.10
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -3194,6 +3194,10 @@ const SuspenseImpl = {
|
|
|
3194
3194
|
rendererInternals
|
|
3195
3195
|
);
|
|
3196
3196
|
} else {
|
|
3197
|
+
if (parentSuspense && parentSuspense.deps > 0) {
|
|
3198
|
+
n2.suspense = n1.suspense;
|
|
3199
|
+
return;
|
|
3200
|
+
}
|
|
3197
3201
|
patchSuspense(
|
|
3198
3202
|
n1,
|
|
3199
3203
|
n2,
|
|
@@ -5840,58 +5844,6 @@ function useSlots() {
|
|
|
5840
5844
|
function useAttrs() {
|
|
5841
5845
|
return getContext().attrs;
|
|
5842
5846
|
}
|
|
5843
|
-
function useModel(props, name, options = EMPTY_OBJ) {
|
|
5844
|
-
const i = getCurrentInstance();
|
|
5845
|
-
if (!i) {
|
|
5846
|
-
warn$1(`useModel() called without active instance.`);
|
|
5847
|
-
return ref();
|
|
5848
|
-
}
|
|
5849
|
-
if (!i.propsOptions[0][name]) {
|
|
5850
|
-
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
|
5851
|
-
return ref();
|
|
5852
|
-
}
|
|
5853
|
-
const camelizedName = camelize(name);
|
|
5854
|
-
const hyphenatedName = hyphenate(name);
|
|
5855
|
-
const res = customRef((track, trigger) => {
|
|
5856
|
-
let localValue;
|
|
5857
|
-
watchSyncEffect(() => {
|
|
5858
|
-
const propValue = props[name];
|
|
5859
|
-
if (hasChanged(localValue, propValue)) {
|
|
5860
|
-
localValue = propValue;
|
|
5861
|
-
trigger();
|
|
5862
|
-
}
|
|
5863
|
-
});
|
|
5864
|
-
return {
|
|
5865
|
-
get() {
|
|
5866
|
-
track();
|
|
5867
|
-
return options.get ? options.get(localValue) : localValue;
|
|
5868
|
-
},
|
|
5869
|
-
set(value) {
|
|
5870
|
-
const rawProps = i.vnode.props;
|
|
5871
|
-
if (!(rawProps && // check if parent has passed v-model
|
|
5872
|
-
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
|
|
5873
|
-
localValue = value;
|
|
5874
|
-
trigger();
|
|
5875
|
-
}
|
|
5876
|
-
i.emit(`update:${name}`, options.set ? options.set(value) : value);
|
|
5877
|
-
}
|
|
5878
|
-
};
|
|
5879
|
-
});
|
|
5880
|
-
const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
|
|
5881
|
-
res[Symbol.iterator] = () => {
|
|
5882
|
-
let i2 = 0;
|
|
5883
|
-
return {
|
|
5884
|
-
next() {
|
|
5885
|
-
if (i2 < 2) {
|
|
5886
|
-
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
|
|
5887
|
-
} else {
|
|
5888
|
-
return { done: true };
|
|
5889
|
-
}
|
|
5890
|
-
}
|
|
5891
|
-
};
|
|
5892
|
-
};
|
|
5893
|
-
return res;
|
|
5894
|
-
}
|
|
5895
5847
|
function getContext() {
|
|
5896
5848
|
const i = getCurrentInstance();
|
|
5897
5849
|
if (!i) {
|
|
@@ -6463,7 +6415,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6463
6415
|
return vm;
|
|
6464
6416
|
}
|
|
6465
6417
|
}
|
|
6466
|
-
Vue.version = `2.6.14-compat:${"3.4.
|
|
6418
|
+
Vue.version = `2.6.14-compat:${"3.4.10"}`;
|
|
6467
6419
|
Vue.config = singletonApp.config;
|
|
6468
6420
|
Vue.use = (p, ...options) => {
|
|
6469
6421
|
if (p && isFunction(p.install)) {
|
|
@@ -8214,8 +8166,13 @@ function propHasMismatch(el, key, clientValue, vnode) {
|
|
|
8214
8166
|
actual = el.hasAttribute(key);
|
|
8215
8167
|
expected = includeBooleanAttr(clientValue);
|
|
8216
8168
|
} else {
|
|
8217
|
-
|
|
8218
|
-
|
|
8169
|
+
if (el.hasAttribute(key)) {
|
|
8170
|
+
actual = el.getAttribute(key);
|
|
8171
|
+
} else {
|
|
8172
|
+
const serverValue = el[key];
|
|
8173
|
+
actual = isObject(serverValue) || serverValue == null ? "" : String(serverValue);
|
|
8174
|
+
}
|
|
8175
|
+
expected = isObject(clientValue) || clientValue == null ? "" : String(clientValue);
|
|
8219
8176
|
}
|
|
8220
8177
|
if (actual !== expected) {
|
|
8221
8178
|
mismatchType = `attribute`;
|
|
@@ -8224,15 +8181,15 @@ function propHasMismatch(el, key, clientValue, vnode) {
|
|
|
8224
8181
|
}
|
|
8225
8182
|
if (mismatchType) {
|
|
8226
8183
|
const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
|
|
8227
|
-
|
|
8228
|
-
|
|
8229
|
-
el,
|
|
8230
|
-
`
|
|
8184
|
+
const preSegment = `Hydration ${mismatchType} mismatch on`;
|
|
8185
|
+
const postSegment = `
|
|
8231
8186
|
- rendered on server: ${format(actual)}
|
|
8232
8187
|
- expected on client: ${format(expected)}
|
|
8233
8188
|
Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
|
|
8234
|
-
You should fix the source of the mismatch
|
|
8235
|
-
|
|
8189
|
+
You should fix the source of the mismatch.`;
|
|
8190
|
+
{
|
|
8191
|
+
warn$1(preSegment, el, postSegment);
|
|
8192
|
+
}
|
|
8236
8193
|
return true;
|
|
8237
8194
|
}
|
|
8238
8195
|
return false;
|
|
@@ -10995,6 +10952,59 @@ const computed = (getterOrOptions, debugOptions) => {
|
|
|
10995
10952
|
return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
10996
10953
|
};
|
|
10997
10954
|
|
|
10955
|
+
function useModel(props, name, options = EMPTY_OBJ) {
|
|
10956
|
+
const i = getCurrentInstance();
|
|
10957
|
+
if (!i) {
|
|
10958
|
+
warn$1(`useModel() called without active instance.`);
|
|
10959
|
+
return ref();
|
|
10960
|
+
}
|
|
10961
|
+
if (!i.propsOptions[0][name]) {
|
|
10962
|
+
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
|
10963
|
+
return ref();
|
|
10964
|
+
}
|
|
10965
|
+
const camelizedName = camelize(name);
|
|
10966
|
+
const hyphenatedName = hyphenate(name);
|
|
10967
|
+
const res = customRef((track, trigger) => {
|
|
10968
|
+
let localValue;
|
|
10969
|
+
watchSyncEffect(() => {
|
|
10970
|
+
const propValue = props[name];
|
|
10971
|
+
if (hasChanged(localValue, propValue)) {
|
|
10972
|
+
localValue = propValue;
|
|
10973
|
+
trigger();
|
|
10974
|
+
}
|
|
10975
|
+
});
|
|
10976
|
+
return {
|
|
10977
|
+
get() {
|
|
10978
|
+
track();
|
|
10979
|
+
return options.get ? options.get(localValue) : localValue;
|
|
10980
|
+
},
|
|
10981
|
+
set(value) {
|
|
10982
|
+
const rawProps = i.vnode.props;
|
|
10983
|
+
if (!(rawProps && // check if parent has passed v-model
|
|
10984
|
+
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
|
|
10985
|
+
localValue = value;
|
|
10986
|
+
trigger();
|
|
10987
|
+
}
|
|
10988
|
+
i.emit(`update:${name}`, options.set ? options.set(value) : value);
|
|
10989
|
+
}
|
|
10990
|
+
};
|
|
10991
|
+
});
|
|
10992
|
+
const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
|
|
10993
|
+
res[Symbol.iterator] = () => {
|
|
10994
|
+
let i2 = 0;
|
|
10995
|
+
return {
|
|
10996
|
+
next() {
|
|
10997
|
+
if (i2 < 2) {
|
|
10998
|
+
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
|
|
10999
|
+
} else {
|
|
11000
|
+
return { done: true };
|
|
11001
|
+
}
|
|
11002
|
+
}
|
|
11003
|
+
};
|
|
11004
|
+
};
|
|
11005
|
+
return res;
|
|
11006
|
+
}
|
|
11007
|
+
|
|
10998
11008
|
function h(type, propsOrChildren, children) {
|
|
10999
11009
|
const l = arguments.length;
|
|
11000
11010
|
if (l === 2) {
|
|
@@ -11217,7 +11227,7 @@ function isMemoSame(cached, memo) {
|
|
|
11217
11227
|
return true;
|
|
11218
11228
|
}
|
|
11219
11229
|
|
|
11220
|
-
const version = "3.4.
|
|
11230
|
+
const version = "3.4.10";
|
|
11221
11231
|
const warn = warn$1 ;
|
|
11222
11232
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11223
11233
|
const devtools = devtools$1 ;
|
|
@@ -11730,6 +11740,7 @@ function setVarsOnNode(el, vars) {
|
|
|
11730
11740
|
|
|
11731
11741
|
function patchStyle(el, prev, next) {
|
|
11732
11742
|
const style = el.style;
|
|
11743
|
+
const currentDisplay = style.display;
|
|
11733
11744
|
const isCssString = isString(next);
|
|
11734
11745
|
if (next && !isCssString) {
|
|
11735
11746
|
if (prev && !isString(prev)) {
|
|
@@ -11743,7 +11754,6 @@ function patchStyle(el, prev, next) {
|
|
|
11743
11754
|
setStyle(style, key, next[key]);
|
|
11744
11755
|
}
|
|
11745
11756
|
} else {
|
|
11746
|
-
const currentDisplay = style.display;
|
|
11747
11757
|
if (isCssString) {
|
|
11748
11758
|
if (prev !== next) {
|
|
11749
11759
|
const cssVarText = style[CSS_VAR_TEXT];
|
|
@@ -11755,9 +11765,9 @@ function patchStyle(el, prev, next) {
|
|
|
11755
11765
|
} else if (prev) {
|
|
11756
11766
|
el.removeAttribute("style");
|
|
11757
11767
|
}
|
|
11758
|
-
|
|
11759
|
-
|
|
11760
|
-
|
|
11768
|
+
}
|
|
11769
|
+
if (vShowOldKey in el) {
|
|
11770
|
+
style.display = currentDisplay;
|
|
11761
11771
|
}
|
|
11762
11772
|
}
|
|
11763
11773
|
const semicolonRE = /[^\\];\s*$/;
|