vue 3.4.8 → 3.4.9
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 +1 -1
- package/dist/vue.cjs.prod.js +1 -1
- package/dist/vue.esm-browser.js +80 -66
- package/dist/vue.esm-browser.prod.js +4 -4
- package/dist/vue.esm-bundler.js +1 -1
- package/dist/vue.global.js +80 -66
- package/dist/vue.global.prod.js +5 -5
- package/dist/vue.runtime.esm-browser.js +80 -66
- package/dist/vue.runtime.esm-browser.prod.js +4 -4
- package/dist/vue.runtime.esm-bundler.js +1 -1
- package/dist/vue.runtime.global.js +80 -66
- package/dist/vue.runtime.global.prod.js +5 -5
- package/package.json +11 -6
package/dist/vue.cjs.js
CHANGED
package/dist/vue.cjs.prod.js
CHANGED
package/dist/vue.esm-browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* vue v3.4.
|
|
2
|
+
* vue v3.4.9
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2738,6 +2738,10 @@ const SuspenseImpl = {
|
|
|
2738
2738
|
rendererInternals
|
|
2739
2739
|
);
|
|
2740
2740
|
} else {
|
|
2741
|
+
if (parentSuspense && parentSuspense.deps > 0) {
|
|
2742
|
+
n2.suspense = n1.suspense;
|
|
2743
|
+
return;
|
|
2744
|
+
}
|
|
2741
2745
|
patchSuspense(
|
|
2742
2746
|
n1,
|
|
2743
2747
|
n2,
|
|
@@ -4811,58 +4815,6 @@ function useSlots() {
|
|
|
4811
4815
|
function useAttrs() {
|
|
4812
4816
|
return getContext().attrs;
|
|
4813
4817
|
}
|
|
4814
|
-
function useModel(props, name, options = EMPTY_OBJ) {
|
|
4815
|
-
const i = getCurrentInstance();
|
|
4816
|
-
if (!i) {
|
|
4817
|
-
warn$1(`useModel() called without active instance.`);
|
|
4818
|
-
return ref();
|
|
4819
|
-
}
|
|
4820
|
-
if (!i.propsOptions[0][name]) {
|
|
4821
|
-
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
|
4822
|
-
return ref();
|
|
4823
|
-
}
|
|
4824
|
-
const camelizedName = camelize(name);
|
|
4825
|
-
const hyphenatedName = hyphenate(name);
|
|
4826
|
-
const res = customRef((track, trigger) => {
|
|
4827
|
-
let localValue;
|
|
4828
|
-
watchSyncEffect(() => {
|
|
4829
|
-
const propValue = props[name];
|
|
4830
|
-
if (hasChanged(localValue, propValue)) {
|
|
4831
|
-
localValue = propValue;
|
|
4832
|
-
trigger();
|
|
4833
|
-
}
|
|
4834
|
-
});
|
|
4835
|
-
return {
|
|
4836
|
-
get() {
|
|
4837
|
-
track();
|
|
4838
|
-
return options.get ? options.get(localValue) : localValue;
|
|
4839
|
-
},
|
|
4840
|
-
set(value) {
|
|
4841
|
-
const rawProps = i.vnode.props;
|
|
4842
|
-
if (!(rawProps && // check if parent has passed v-model
|
|
4843
|
-
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
|
|
4844
|
-
localValue = value;
|
|
4845
|
-
trigger();
|
|
4846
|
-
}
|
|
4847
|
-
i.emit(`update:${name}`, options.set ? options.set(value) : value);
|
|
4848
|
-
}
|
|
4849
|
-
};
|
|
4850
|
-
});
|
|
4851
|
-
const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
|
|
4852
|
-
res[Symbol.iterator] = () => {
|
|
4853
|
-
let i2 = 0;
|
|
4854
|
-
return {
|
|
4855
|
-
next() {
|
|
4856
|
-
if (i2 < 2) {
|
|
4857
|
-
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
|
|
4858
|
-
} else {
|
|
4859
|
-
return { done: true };
|
|
4860
|
-
}
|
|
4861
|
-
}
|
|
4862
|
-
};
|
|
4863
|
-
};
|
|
4864
|
-
return res;
|
|
4865
|
-
}
|
|
4866
4818
|
function getContext() {
|
|
4867
4819
|
const i = getCurrentInstance();
|
|
4868
4820
|
if (!i) {
|
|
@@ -6649,8 +6601,17 @@ function propHasMismatch(el, key, clientValue, vnode) {
|
|
|
6649
6601
|
actual = el.hasAttribute(key);
|
|
6650
6602
|
expected = includeBooleanAttr(clientValue);
|
|
6651
6603
|
} else {
|
|
6652
|
-
|
|
6653
|
-
|
|
6604
|
+
if (el.hasAttribute(key)) {
|
|
6605
|
+
actual = el.getAttribute(key);
|
|
6606
|
+
} else if (key in el) {
|
|
6607
|
+
const serverValue = el[key];
|
|
6608
|
+
if (!isObject(serverValue)) {
|
|
6609
|
+
actual = serverValue == null ? "" : String(serverValue);
|
|
6610
|
+
}
|
|
6611
|
+
}
|
|
6612
|
+
if (!isObject(clientValue)) {
|
|
6613
|
+
expected = clientValue == null ? "" : String(clientValue);
|
|
6614
|
+
}
|
|
6654
6615
|
}
|
|
6655
6616
|
if (actual !== expected) {
|
|
6656
6617
|
mismatchType = `attribute`;
|
|
@@ -6659,15 +6620,15 @@ function propHasMismatch(el, key, clientValue, vnode) {
|
|
|
6659
6620
|
}
|
|
6660
6621
|
if (mismatchType) {
|
|
6661
6622
|
const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
el,
|
|
6665
|
-
`
|
|
6623
|
+
const preSegment = `Hydration ${mismatchType} mismatch on`;
|
|
6624
|
+
const postSegment = `
|
|
6666
6625
|
- rendered on server: ${format(actual)}
|
|
6667
6626
|
- expected on client: ${format(expected)}
|
|
6668
6627
|
Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
|
|
6669
|
-
You should fix the source of the mismatch
|
|
6670
|
-
|
|
6628
|
+
You should fix the source of the mismatch.`;
|
|
6629
|
+
{
|
|
6630
|
+
warn$1(preSegment, el, postSegment);
|
|
6631
|
+
}
|
|
6671
6632
|
return true;
|
|
6672
6633
|
}
|
|
6673
6634
|
return false;
|
|
@@ -9323,6 +9284,59 @@ const computed = (getterOrOptions, debugOptions) => {
|
|
|
9323
9284
|
return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
9324
9285
|
};
|
|
9325
9286
|
|
|
9287
|
+
function useModel(props, name, options = EMPTY_OBJ) {
|
|
9288
|
+
const i = getCurrentInstance();
|
|
9289
|
+
if (!i) {
|
|
9290
|
+
warn$1(`useModel() called without active instance.`);
|
|
9291
|
+
return ref();
|
|
9292
|
+
}
|
|
9293
|
+
if (!i.propsOptions[0][name]) {
|
|
9294
|
+
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
|
9295
|
+
return ref();
|
|
9296
|
+
}
|
|
9297
|
+
const camelizedName = camelize(name);
|
|
9298
|
+
const hyphenatedName = hyphenate(name);
|
|
9299
|
+
const res = customRef((track, trigger) => {
|
|
9300
|
+
let localValue;
|
|
9301
|
+
watchSyncEffect(() => {
|
|
9302
|
+
const propValue = props[name];
|
|
9303
|
+
if (hasChanged(localValue, propValue)) {
|
|
9304
|
+
localValue = propValue;
|
|
9305
|
+
trigger();
|
|
9306
|
+
}
|
|
9307
|
+
});
|
|
9308
|
+
return {
|
|
9309
|
+
get() {
|
|
9310
|
+
track();
|
|
9311
|
+
return options.get ? options.get(localValue) : localValue;
|
|
9312
|
+
},
|
|
9313
|
+
set(value) {
|
|
9314
|
+
const rawProps = i.vnode.props;
|
|
9315
|
+
if (!(rawProps && // check if parent has passed v-model
|
|
9316
|
+
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
|
|
9317
|
+
localValue = value;
|
|
9318
|
+
trigger();
|
|
9319
|
+
}
|
|
9320
|
+
i.emit(`update:${name}`, options.set ? options.set(value) : value);
|
|
9321
|
+
}
|
|
9322
|
+
};
|
|
9323
|
+
});
|
|
9324
|
+
const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
|
|
9325
|
+
res[Symbol.iterator] = () => {
|
|
9326
|
+
let i2 = 0;
|
|
9327
|
+
return {
|
|
9328
|
+
next() {
|
|
9329
|
+
if (i2 < 2) {
|
|
9330
|
+
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
|
|
9331
|
+
} else {
|
|
9332
|
+
return { done: true };
|
|
9333
|
+
}
|
|
9334
|
+
}
|
|
9335
|
+
};
|
|
9336
|
+
};
|
|
9337
|
+
return res;
|
|
9338
|
+
}
|
|
9339
|
+
|
|
9326
9340
|
function h(type, propsOrChildren, children) {
|
|
9327
9341
|
const l = arguments.length;
|
|
9328
9342
|
if (l === 2) {
|
|
@@ -9545,7 +9559,7 @@ function isMemoSame(cached, memo) {
|
|
|
9545
9559
|
return true;
|
|
9546
9560
|
}
|
|
9547
9561
|
|
|
9548
|
-
const version = "3.4.
|
|
9562
|
+
const version = "3.4.9";
|
|
9549
9563
|
const warn = warn$1 ;
|
|
9550
9564
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9551
9565
|
const devtools = devtools$1 ;
|
|
@@ -10014,6 +10028,7 @@ function setVarsOnNode(el, vars) {
|
|
|
10014
10028
|
|
|
10015
10029
|
function patchStyle(el, prev, next) {
|
|
10016
10030
|
const style = el.style;
|
|
10031
|
+
const currentDisplay = style.display;
|
|
10017
10032
|
const isCssString = isString(next);
|
|
10018
10033
|
if (next && !isCssString) {
|
|
10019
10034
|
if (prev && !isString(prev)) {
|
|
@@ -10027,7 +10042,6 @@ function patchStyle(el, prev, next) {
|
|
|
10027
10042
|
setStyle(style, key, next[key]);
|
|
10028
10043
|
}
|
|
10029
10044
|
} else {
|
|
10030
|
-
const currentDisplay = style.display;
|
|
10031
10045
|
if (isCssString) {
|
|
10032
10046
|
if (prev !== next) {
|
|
10033
10047
|
const cssVarText = style[CSS_VAR_TEXT];
|
|
@@ -10039,9 +10053,9 @@ function patchStyle(el, prev, next) {
|
|
|
10039
10053
|
} else if (prev) {
|
|
10040
10054
|
el.removeAttribute("style");
|
|
10041
10055
|
}
|
|
10042
|
-
|
|
10043
|
-
|
|
10044
|
-
|
|
10056
|
+
}
|
|
10057
|
+
if (vShowOldKey in el) {
|
|
10058
|
+
style.display = currentDisplay;
|
|
10045
10059
|
}
|
|
10046
10060
|
}
|
|
10047
10061
|
const semicolonRE = /[^\\];\s*$/;
|