@vue/runtime-dom 3.4.18 → 3.4.20
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/runtime-dom.cjs.js +35 -25
- package/dist/runtime-dom.cjs.prod.js +35 -25
- package/dist/runtime-dom.d.ts +4 -2
- package/dist/runtime-dom.esm-browser.js +89 -67
- package/dist/runtime-dom.esm-browser.prod.js +5 -5
- package/dist/runtime-dom.esm-bundler.js +35 -25
- package/dist/runtime-dom.global.js +89 -67
- package/dist/runtime-dom.global.prod.js +5 -5
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.4.
|
|
2
|
+
* @vue/runtime-dom v3.4.20
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -358,10 +358,11 @@ function patchClass(el, value, isSVG) {
|
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
-
const
|
|
361
|
+
const vShowOriginalDisplay = Symbol("_vod");
|
|
362
|
+
const vShowHidden = Symbol("_vsh");
|
|
362
363
|
const vShow = {
|
|
363
364
|
beforeMount(el, { value }, { transition }) {
|
|
364
|
-
el[
|
|
365
|
+
el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display;
|
|
365
366
|
if (transition && value) {
|
|
366
367
|
transition.beforeEnter(el);
|
|
367
368
|
} else {
|
|
@@ -374,7 +375,7 @@ const vShow = {
|
|
|
374
375
|
}
|
|
375
376
|
},
|
|
376
377
|
updated(el, { value, oldValue }, { transition }) {
|
|
377
|
-
if (!value === !oldValue
|
|
378
|
+
if (!value === !oldValue)
|
|
378
379
|
return;
|
|
379
380
|
if (transition) {
|
|
380
381
|
if (value) {
|
|
@@ -398,7 +399,8 @@ if (!!(process.env.NODE_ENV !== "production")) {
|
|
|
398
399
|
vShow.name = "show";
|
|
399
400
|
}
|
|
400
401
|
function setDisplay(el, value) {
|
|
401
|
-
el.style.display = value ? el[
|
|
402
|
+
el.style.display = value ? el[vShowOriginalDisplay] : "none";
|
|
403
|
+
el[vShowHidden] = !value;
|
|
402
404
|
}
|
|
403
405
|
function initVShowForSSR() {
|
|
404
406
|
vShow.getSSRProps = ({ value }) => {
|
|
@@ -478,13 +480,21 @@ const displayRE = /(^|;)\s*display\s*:/;
|
|
|
478
480
|
function patchStyle(el, prev, next) {
|
|
479
481
|
const style = el.style;
|
|
480
482
|
const isCssString = isString(next);
|
|
481
|
-
const currentDisplay = style.display;
|
|
482
483
|
let hasControlledDisplay = false;
|
|
483
484
|
if (next && !isCssString) {
|
|
484
|
-
if (prev
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
485
|
+
if (prev) {
|
|
486
|
+
if (!isString(prev)) {
|
|
487
|
+
for (const key in prev) {
|
|
488
|
+
if (next[key] == null) {
|
|
489
|
+
setStyle(style, key, "");
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
} else {
|
|
493
|
+
for (const prevStyle of prev.split(";")) {
|
|
494
|
+
const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
|
|
495
|
+
if (next[key] == null) {
|
|
496
|
+
setStyle(style, key, "");
|
|
497
|
+
}
|
|
488
498
|
}
|
|
489
499
|
}
|
|
490
500
|
}
|
|
@@ -508,9 +518,11 @@ function patchStyle(el, prev, next) {
|
|
|
508
518
|
el.removeAttribute("style");
|
|
509
519
|
}
|
|
510
520
|
}
|
|
511
|
-
if (
|
|
512
|
-
el[
|
|
513
|
-
|
|
521
|
+
if (vShowOriginalDisplay in el) {
|
|
522
|
+
el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
523
|
+
if (el[vShowHidden]) {
|
|
524
|
+
style.display = "none";
|
|
525
|
+
}
|
|
514
526
|
}
|
|
515
527
|
}
|
|
516
528
|
const semicolonRE = /[^\\];\s*$/;
|
|
@@ -595,7 +607,7 @@ function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspe
|
|
|
595
607
|
if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
|
|
596
608
|
!tag.includes("-")) {
|
|
597
609
|
el._value = value;
|
|
598
|
-
const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value;
|
|
610
|
+
const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
|
|
599
611
|
const newValue = value == null ? "" : value;
|
|
600
612
|
if (oldValue !== newValue) {
|
|
601
613
|
el.value = newValue;
|
|
@@ -1286,19 +1298,19 @@ const vModelSelect = {
|
|
|
1286
1298
|
},
|
|
1287
1299
|
// set value in mounted & updated because <select> relies on its children
|
|
1288
1300
|
// <option>s.
|
|
1289
|
-
mounted(el, { value,
|
|
1290
|
-
setSelected(el, value,
|
|
1301
|
+
mounted(el, { value, modifiers: { number } }) {
|
|
1302
|
+
setSelected(el, value, number);
|
|
1291
1303
|
},
|
|
1292
1304
|
beforeUpdate(el, _binding, vnode) {
|
|
1293
1305
|
el[assignKey] = getModelAssigner(vnode);
|
|
1294
1306
|
},
|
|
1295
|
-
updated(el, { value,
|
|
1307
|
+
updated(el, { value, modifiers: { number } }) {
|
|
1296
1308
|
if (!el._assigning) {
|
|
1297
|
-
setSelected(el, value,
|
|
1309
|
+
setSelected(el, value, number);
|
|
1298
1310
|
}
|
|
1299
1311
|
}
|
|
1300
1312
|
};
|
|
1301
|
-
function setSelected(el, value,
|
|
1313
|
+
function setSelected(el, value, number) {
|
|
1302
1314
|
const isMultiple = el.multiple;
|
|
1303
1315
|
const isArrayValue = isArray(value);
|
|
1304
1316
|
if (isMultiple && !isArrayValue && !isSet(value)) {
|
|
@@ -1323,12 +1335,10 @@ function setSelected(el, value, oldValue, number) {
|
|
|
1323
1335
|
} else {
|
|
1324
1336
|
option.selected = value.has(optionValue);
|
|
1325
1337
|
}
|
|
1326
|
-
} else {
|
|
1327
|
-
if (
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
return;
|
|
1331
|
-
}
|
|
1338
|
+
} else if (looseEqual(getValue(option), value)) {
|
|
1339
|
+
if (el.selectedIndex !== i)
|
|
1340
|
+
el.selectedIndex = i;
|
|
1341
|
+
return;
|
|
1332
1342
|
}
|
|
1333
1343
|
}
|
|
1334
1344
|
if (!isMultiple && el.selectedIndex !== -1) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.4.
|
|
2
|
+
* @vue/runtime-dom v3.4.20
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -733,20 +733,20 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
733
733
|
return obj.hasOwnProperty(key);
|
|
734
734
|
}
|
|
735
735
|
class BaseReactiveHandler {
|
|
736
|
-
constructor(_isReadonly = false,
|
|
736
|
+
constructor(_isReadonly = false, _isShallow = false) {
|
|
737
737
|
this._isReadonly = _isReadonly;
|
|
738
|
-
this.
|
|
738
|
+
this._isShallow = _isShallow;
|
|
739
739
|
}
|
|
740
740
|
get(target, key, receiver) {
|
|
741
|
-
const isReadonly2 = this._isReadonly,
|
|
741
|
+
const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
|
|
742
742
|
if (key === "__v_isReactive") {
|
|
743
743
|
return !isReadonly2;
|
|
744
744
|
} else if (key === "__v_isReadonly") {
|
|
745
745
|
return isReadonly2;
|
|
746
746
|
} else if (key === "__v_isShallow") {
|
|
747
|
-
return
|
|
747
|
+
return isShallow2;
|
|
748
748
|
} else if (key === "__v_raw") {
|
|
749
|
-
if (receiver === (isReadonly2 ?
|
|
749
|
+
if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
|
|
750
750
|
// this means the reciever is a user proxy of the reactive proxy
|
|
751
751
|
Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
|
|
752
752
|
return target;
|
|
@@ -769,7 +769,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
769
769
|
if (!isReadonly2) {
|
|
770
770
|
track(target, "get", key);
|
|
771
771
|
}
|
|
772
|
-
if (
|
|
772
|
+
if (isShallow2) {
|
|
773
773
|
return res;
|
|
774
774
|
}
|
|
775
775
|
if (isRef(res)) {
|
|
@@ -782,12 +782,12 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
784
|
class MutableReactiveHandler extends BaseReactiveHandler {
|
|
785
|
-
constructor(
|
|
786
|
-
super(false,
|
|
785
|
+
constructor(isShallow2 = false) {
|
|
786
|
+
super(false, isShallow2);
|
|
787
787
|
}
|
|
788
788
|
set(target, key, value, receiver) {
|
|
789
789
|
let oldValue = target[key];
|
|
790
|
-
if (!this.
|
|
790
|
+
if (!this._isShallow) {
|
|
791
791
|
const isOldValueReadonly = isReadonly(oldValue);
|
|
792
792
|
if (!isShallow(value) && !isReadonly(value)) {
|
|
793
793
|
oldValue = toRaw(oldValue);
|
|
@@ -839,8 +839,8 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
839
839
|
}
|
|
840
840
|
}
|
|
841
841
|
class ReadonlyReactiveHandler extends BaseReactiveHandler {
|
|
842
|
-
constructor(
|
|
843
|
-
super(true,
|
|
842
|
+
constructor(isShallow2 = false) {
|
|
843
|
+
super(true, isShallow2);
|
|
844
844
|
}
|
|
845
845
|
set(target, key) {
|
|
846
846
|
{
|
|
@@ -1011,7 +1011,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1011
1011
|
return function(...args) {
|
|
1012
1012
|
{
|
|
1013
1013
|
const key = args[0] ? `on key "${args[0]}" ` : ``;
|
|
1014
|
-
|
|
1014
|
+
warn$2(
|
|
1015
1015
|
`${capitalize(type)} operation ${key}failed: target is readonly.`,
|
|
1016
1016
|
toRaw(this)
|
|
1017
1017
|
);
|
|
@@ -1149,7 +1149,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1149
1149
|
const rawKey = toRaw(key);
|
|
1150
1150
|
if (rawKey !== key && has2.call(target, rawKey)) {
|
|
1151
1151
|
const type = toRawType(target);
|
|
1152
|
-
|
|
1152
|
+
warn$2(
|
|
1153
1153
|
`Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`
|
|
1154
1154
|
);
|
|
1155
1155
|
}
|
|
@@ -1218,7 +1218,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1218
1218
|
function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
|
|
1219
1219
|
if (!isObject(target)) {
|
|
1220
1220
|
{
|
|
1221
|
-
|
|
1221
|
+
warn$2(`value cannot be made reactive: ${String(target)}`);
|
|
1222
1222
|
}
|
|
1223
1223
|
return target;
|
|
1224
1224
|
}
|
|
@@ -1268,8 +1268,10 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1268
1268
|
const toReactive = (value) => isObject(value) ? reactive(value) : value;
|
|
1269
1269
|
const toReadonly = (value) => isObject(value) ? readonly(value) : value;
|
|
1270
1270
|
|
|
1271
|
+
const COMPUTED_SIDE_EFFECT_WARN = `Computed is still dirty after getter evaluation, likely because a computed is mutating its own dependency in its getter. State mutations in computed getters should be avoided. Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free`;
|
|
1271
1272
|
class ComputedRefImpl {
|
|
1272
1273
|
constructor(getter, _setter, isReadonly, isSSR) {
|
|
1274
|
+
this.getter = getter;
|
|
1273
1275
|
this._setter = _setter;
|
|
1274
1276
|
this.dep = void 0;
|
|
1275
1277
|
this.__v_isRef = true;
|
|
@@ -1292,6 +1294,11 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1292
1294
|
}
|
|
1293
1295
|
trackRefValue(self);
|
|
1294
1296
|
if (self.effect._dirtyLevel >= 2) {
|
|
1297
|
+
if (this._warnRecursive) {
|
|
1298
|
+
warn$2(COMPUTED_SIDE_EFFECT_WARN, `
|
|
1299
|
+
|
|
1300
|
+
getter: `, this.getter);
|
|
1301
|
+
}
|
|
1295
1302
|
triggerRefValue(self, 2);
|
|
1296
1303
|
}
|
|
1297
1304
|
return self._value;
|
|
@@ -1315,7 +1322,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1315
1322
|
if (onlyGetter) {
|
|
1316
1323
|
getter = getterOrOptions;
|
|
1317
1324
|
setter = () => {
|
|
1318
|
-
|
|
1325
|
+
warn$2("Write operation failed: computed value is readonly");
|
|
1319
1326
|
} ;
|
|
1320
1327
|
} else {
|
|
1321
1328
|
getter = getterOrOptions.get;
|
|
@@ -1447,7 +1454,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1447
1454
|
}
|
|
1448
1455
|
function toRefs(object) {
|
|
1449
1456
|
if (!isProxy(object)) {
|
|
1450
|
-
|
|
1457
|
+
warn$2(`toRefs() expects a reactive object but received a plain one.`);
|
|
1451
1458
|
}
|
|
1452
1459
|
const ret = isArray(object) ? new Array(object.length) : {};
|
|
1453
1460
|
for (const key in object) {
|
|
@@ -1689,13 +1696,11 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1689
1696
|
[14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."
|
|
1690
1697
|
};
|
|
1691
1698
|
function callWithErrorHandling(fn, instance, type, args) {
|
|
1692
|
-
let res;
|
|
1693
1699
|
try {
|
|
1694
|
-
|
|
1700
|
+
return args ? fn(...args) : fn();
|
|
1695
1701
|
} catch (err) {
|
|
1696
1702
|
handleError(err, instance, type);
|
|
1697
1703
|
}
|
|
1698
|
-
return res;
|
|
1699
1704
|
}
|
|
1700
1705
|
function callWithAsyncErrorHandling(fn, instance, type, args) {
|
|
1701
1706
|
if (isFunction(fn)) {
|
|
@@ -2700,6 +2705,8 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
2700
2705
|
} else {
|
|
2701
2706
|
if (parentSuspense && parentSuspense.deps > 0) {
|
|
2702
2707
|
n2.suspense = n1.suspense;
|
|
2708
|
+
n2.suspense.vnode = n2;
|
|
2709
|
+
n2.el = n1.el;
|
|
2703
2710
|
return;
|
|
2704
2711
|
}
|
|
2705
2712
|
patchSuspense(
|
|
@@ -3626,7 +3633,6 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3626
3633
|
setup(props, { slots }) {
|
|
3627
3634
|
const instance = getCurrentInstance();
|
|
3628
3635
|
const state = useTransitionState();
|
|
3629
|
-
let prevTransitionKey;
|
|
3630
3636
|
return () => {
|
|
3631
3637
|
const children = slots.default && getTransitionRawChildren(slots.default(), true);
|
|
3632
3638
|
if (!children || !children.length) {
|
|
@@ -3669,18 +3675,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3669
3675
|
setTransitionHooks(innerChild, enterHooks);
|
|
3670
3676
|
const oldChild = instance.subTree;
|
|
3671
3677
|
const oldInnerChild = oldChild && getKeepAliveChild(oldChild);
|
|
3672
|
-
|
|
3673
|
-
const { getTransitionKey } = innerChild.type;
|
|
3674
|
-
if (getTransitionKey) {
|
|
3675
|
-
const key = getTransitionKey();
|
|
3676
|
-
if (prevTransitionKey === void 0) {
|
|
3677
|
-
prevTransitionKey = key;
|
|
3678
|
-
} else if (key !== prevTransitionKey) {
|
|
3679
|
-
prevTransitionKey = key;
|
|
3680
|
-
transitionKeyChanged = true;
|
|
3681
|
-
}
|
|
3682
|
-
}
|
|
3683
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) {
|
|
3678
|
+
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild)) {
|
|
3684
3679
|
const leavingHooks = resolveTransitionHooks(
|
|
3685
3680
|
oldInnerChild,
|
|
3686
3681
|
rawProps,
|
|
@@ -5751,8 +5746,16 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
5751
5746
|
return false;
|
|
5752
5747
|
}
|
|
5753
5748
|
function getType(ctor) {
|
|
5754
|
-
|
|
5755
|
-
|
|
5749
|
+
if (ctor === null) {
|
|
5750
|
+
return "null";
|
|
5751
|
+
}
|
|
5752
|
+
if (typeof ctor === "function") {
|
|
5753
|
+
return ctor.name || "";
|
|
5754
|
+
} else if (typeof ctor === "object") {
|
|
5755
|
+
const name = ctor.constructor && ctor.constructor.name;
|
|
5756
|
+
return name || "";
|
|
5757
|
+
}
|
|
5758
|
+
return "";
|
|
5756
5759
|
}
|
|
5757
5760
|
function isSameType(a, b) {
|
|
5758
5761
|
return getType(a) === getType(b);
|
|
@@ -6549,9 +6552,12 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
6549
6552
|
}
|
|
6550
6553
|
}
|
|
6551
6554
|
}
|
|
6552
|
-
const
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
+
const root = instance == null ? void 0 : instance.subTree;
|
|
6556
|
+
if (vnode === root || (root == null ? void 0 : root.type) === Fragment && root.children.includes(vnode)) {
|
|
6557
|
+
const cssVars = (_a = instance == null ? void 0 : instance.getCssVars) == null ? void 0 : _a.call(instance);
|
|
6558
|
+
for (const key2 in cssVars) {
|
|
6559
|
+
expectedMap.set(`--${key2}`, String(cssVars[key2]));
|
|
6560
|
+
}
|
|
6555
6561
|
}
|
|
6556
6562
|
if (!isMapEqual(actualMap, expectedMap)) {
|
|
6557
6563
|
mismatchType = mismatchKey = "style";
|
|
@@ -8946,9 +8952,8 @@ Component that was made reactive: `,
|
|
|
8946
8952
|
internalSetCurrentInstance(null);
|
|
8947
8953
|
};
|
|
8948
8954
|
const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
|
|
8949
|
-
function validateComponentName(name,
|
|
8950
|
-
|
|
8951
|
-
if (isBuiltInTag(name) || appIsNativeTag(name)) {
|
|
8955
|
+
function validateComponentName(name, { isNativeTag }) {
|
|
8956
|
+
if (isBuiltInTag(name) || isNativeTag(name)) {
|
|
8952
8957
|
warn$1(
|
|
8953
8958
|
"Do not use built-in or reserved HTML elements as component id: " + name
|
|
8954
8959
|
);
|
|
@@ -9241,7 +9246,14 @@ Component that was made reactive: `,
|
|
|
9241
9246
|
}
|
|
9242
9247
|
|
|
9243
9248
|
const computed = (getterOrOptions, debugOptions) => {
|
|
9244
|
-
|
|
9249
|
+
const c = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
9250
|
+
{
|
|
9251
|
+
const i = getCurrentInstance();
|
|
9252
|
+
if (i && i.appContext.config.warnRecursiveComputed) {
|
|
9253
|
+
c._warnRecursive = true;
|
|
9254
|
+
}
|
|
9255
|
+
}
|
|
9256
|
+
return c;
|
|
9245
9257
|
};
|
|
9246
9258
|
|
|
9247
9259
|
function useModel(props, name, options = EMPTY_OBJ) {
|
|
@@ -9519,7 +9531,7 @@ Component that was made reactive: `,
|
|
|
9519
9531
|
return true;
|
|
9520
9532
|
}
|
|
9521
9533
|
|
|
9522
|
-
const version = "3.4.
|
|
9534
|
+
const version = "3.4.20";
|
|
9523
9535
|
const warn = warn$1 ;
|
|
9524
9536
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9525
9537
|
const devtools = devtools$1 ;
|
|
@@ -9880,10 +9892,11 @@ Component that was made reactive: `,
|
|
|
9880
9892
|
}
|
|
9881
9893
|
}
|
|
9882
9894
|
|
|
9883
|
-
const
|
|
9895
|
+
const vShowOriginalDisplay = Symbol("_vod");
|
|
9896
|
+
const vShowHidden = Symbol("_vsh");
|
|
9884
9897
|
const vShow = {
|
|
9885
9898
|
beforeMount(el, { value }, { transition }) {
|
|
9886
|
-
el[
|
|
9899
|
+
el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display;
|
|
9887
9900
|
if (transition && value) {
|
|
9888
9901
|
transition.beforeEnter(el);
|
|
9889
9902
|
} else {
|
|
@@ -9896,7 +9909,7 @@ Component that was made reactive: `,
|
|
|
9896
9909
|
}
|
|
9897
9910
|
},
|
|
9898
9911
|
updated(el, { value, oldValue }, { transition }) {
|
|
9899
|
-
if (!value === !oldValue
|
|
9912
|
+
if (!value === !oldValue)
|
|
9900
9913
|
return;
|
|
9901
9914
|
if (transition) {
|
|
9902
9915
|
if (value) {
|
|
@@ -9920,7 +9933,8 @@ Component that was made reactive: `,
|
|
|
9920
9933
|
vShow.name = "show";
|
|
9921
9934
|
}
|
|
9922
9935
|
function setDisplay(el, value) {
|
|
9923
|
-
el.style.display = value ? el[
|
|
9936
|
+
el.style.display = value ? el[vShowOriginalDisplay] : "none";
|
|
9937
|
+
el[vShowHidden] = !value;
|
|
9924
9938
|
}
|
|
9925
9939
|
|
|
9926
9940
|
const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" );
|
|
@@ -9993,13 +10007,21 @@ Component that was made reactive: `,
|
|
|
9993
10007
|
function patchStyle(el, prev, next) {
|
|
9994
10008
|
const style = el.style;
|
|
9995
10009
|
const isCssString = isString(next);
|
|
9996
|
-
const currentDisplay = style.display;
|
|
9997
10010
|
let hasControlledDisplay = false;
|
|
9998
10011
|
if (next && !isCssString) {
|
|
9999
|
-
if (prev
|
|
10000
|
-
|
|
10001
|
-
|
|
10002
|
-
|
|
10012
|
+
if (prev) {
|
|
10013
|
+
if (!isString(prev)) {
|
|
10014
|
+
for (const key in prev) {
|
|
10015
|
+
if (next[key] == null) {
|
|
10016
|
+
setStyle(style, key, "");
|
|
10017
|
+
}
|
|
10018
|
+
}
|
|
10019
|
+
} else {
|
|
10020
|
+
for (const prevStyle of prev.split(";")) {
|
|
10021
|
+
const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
|
|
10022
|
+
if (next[key] == null) {
|
|
10023
|
+
setStyle(style, key, "");
|
|
10024
|
+
}
|
|
10003
10025
|
}
|
|
10004
10026
|
}
|
|
10005
10027
|
}
|
|
@@ -10023,9 +10045,11 @@ Component that was made reactive: `,
|
|
|
10023
10045
|
el.removeAttribute("style");
|
|
10024
10046
|
}
|
|
10025
10047
|
}
|
|
10026
|
-
if (
|
|
10027
|
-
el[
|
|
10028
|
-
|
|
10048
|
+
if (vShowOriginalDisplay in el) {
|
|
10049
|
+
el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
10050
|
+
if (el[vShowHidden]) {
|
|
10051
|
+
style.display = "none";
|
|
10052
|
+
}
|
|
10029
10053
|
}
|
|
10030
10054
|
}
|
|
10031
10055
|
const semicolonRE = /[^\\];\s*$/;
|
|
@@ -10110,7 +10134,7 @@ Component that was made reactive: `,
|
|
|
10110
10134
|
if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
|
|
10111
10135
|
!tag.includes("-")) {
|
|
10112
10136
|
el._value = value;
|
|
10113
|
-
const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value;
|
|
10137
|
+
const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
|
|
10114
10138
|
const newValue = value == null ? "" : value;
|
|
10115
10139
|
if (oldValue !== newValue) {
|
|
10116
10140
|
el.value = newValue;
|
|
@@ -10789,19 +10813,19 @@ Component that was made reactive: `,
|
|
|
10789
10813
|
},
|
|
10790
10814
|
// set value in mounted & updated because <select> relies on its children
|
|
10791
10815
|
// <option>s.
|
|
10792
|
-
mounted(el, { value,
|
|
10793
|
-
setSelected(el, value,
|
|
10816
|
+
mounted(el, { value, modifiers: { number } }) {
|
|
10817
|
+
setSelected(el, value, number);
|
|
10794
10818
|
},
|
|
10795
10819
|
beforeUpdate(el, _binding, vnode) {
|
|
10796
10820
|
el[assignKey] = getModelAssigner(vnode);
|
|
10797
10821
|
},
|
|
10798
|
-
updated(el, { value,
|
|
10822
|
+
updated(el, { value, modifiers: { number } }) {
|
|
10799
10823
|
if (!el._assigning) {
|
|
10800
|
-
setSelected(el, value,
|
|
10824
|
+
setSelected(el, value, number);
|
|
10801
10825
|
}
|
|
10802
10826
|
}
|
|
10803
10827
|
};
|
|
10804
|
-
function setSelected(el, value,
|
|
10828
|
+
function setSelected(el, value, number) {
|
|
10805
10829
|
const isMultiple = el.multiple;
|
|
10806
10830
|
const isArrayValue = isArray(value);
|
|
10807
10831
|
if (isMultiple && !isArrayValue && !isSet(value)) {
|
|
@@ -10826,12 +10850,10 @@ Component that was made reactive: `,
|
|
|
10826
10850
|
} else {
|
|
10827
10851
|
option.selected = value.has(optionValue);
|
|
10828
10852
|
}
|
|
10829
|
-
} else {
|
|
10830
|
-
if (
|
|
10831
|
-
|
|
10832
|
-
|
|
10833
|
-
return;
|
|
10834
|
-
}
|
|
10853
|
+
} else if (looseEqual(getValue(option), value)) {
|
|
10854
|
+
if (el.selectedIndex !== i)
|
|
10855
|
+
el.selectedIndex = i;
|
|
10856
|
+
return;
|
|
10835
10857
|
}
|
|
10836
10858
|
}
|
|
10837
10859
|
if (!isMultiple && el.selectedIndex !== -1) {
|