vue 3.5.11 → 3.5.12
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 +202 -233
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +1 -1
- package/dist/vue.global.js +193 -229
- package/dist/vue.global.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +198 -232
- package/dist/vue.runtime.esm-browser.prod.js +2 -2
- package/dist/vue.runtime.esm-bundler.js +1 -1
- package/dist/vue.runtime.global.js +189 -228
- package/dist/vue.runtime.global.prod.js +2 -2
- package/package.json +6 -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.5.
|
|
2
|
+
* vue v3.5.12
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -763,16 +763,16 @@ function removeSub(link, soft = false) {
|
|
|
763
763
|
nextSub.prevSub = prevSub;
|
|
764
764
|
link.nextSub = void 0;
|
|
765
765
|
}
|
|
766
|
-
if (dep.subs === link) {
|
|
767
|
-
dep.subs = prevSub;
|
|
768
|
-
}
|
|
769
766
|
if (dep.subsHead === link) {
|
|
770
767
|
dep.subsHead = nextSub;
|
|
771
768
|
}
|
|
772
|
-
if (
|
|
773
|
-
dep.
|
|
774
|
-
|
|
775
|
-
|
|
769
|
+
if (dep.subs === link) {
|
|
770
|
+
dep.subs = prevSub;
|
|
771
|
+
if (!prevSub && dep.computed) {
|
|
772
|
+
dep.computed.flags &= ~4;
|
|
773
|
+
for (let l = dep.computed.deps; l; l = l.nextDep) {
|
|
774
|
+
removeSub(l, true);
|
|
775
|
+
}
|
|
776
776
|
}
|
|
777
777
|
}
|
|
778
778
|
if (!soft && !--dep.sc && dep.map) {
|
|
@@ -1032,7 +1032,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
1032
1032
|
}
|
|
1033
1033
|
});
|
|
1034
1034
|
} else {
|
|
1035
|
-
if (key !== void 0) {
|
|
1035
|
+
if (key !== void 0 || depsMap.has(void 0)) {
|
|
1036
1036
|
run(depsMap.get(key));
|
|
1037
1037
|
}
|
|
1038
1038
|
if (isArrayIndex) {
|
|
@@ -1407,117 +1407,6 @@ const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true
|
|
|
1407
1407
|
|
|
1408
1408
|
const toShallow = (value) => value;
|
|
1409
1409
|
const getProto = (v) => Reflect.getPrototypeOf(v);
|
|
1410
|
-
function get(target, key, isReadonly2 = false, isShallow2 = false) {
|
|
1411
|
-
target = target["__v_raw"];
|
|
1412
|
-
const rawTarget = toRaw(target);
|
|
1413
|
-
const rawKey = toRaw(key);
|
|
1414
|
-
if (!isReadonly2) {
|
|
1415
|
-
if (hasChanged(key, rawKey)) {
|
|
1416
|
-
track(rawTarget, "get", key);
|
|
1417
|
-
}
|
|
1418
|
-
track(rawTarget, "get", rawKey);
|
|
1419
|
-
}
|
|
1420
|
-
const { has: has2 } = getProto(rawTarget);
|
|
1421
|
-
const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
1422
|
-
if (has2.call(rawTarget, key)) {
|
|
1423
|
-
return wrap(target.get(key));
|
|
1424
|
-
} else if (has2.call(rawTarget, rawKey)) {
|
|
1425
|
-
return wrap(target.get(rawKey));
|
|
1426
|
-
} else if (target !== rawTarget) {
|
|
1427
|
-
target.get(key);
|
|
1428
|
-
}
|
|
1429
|
-
}
|
|
1430
|
-
function has(key, isReadonly2 = false) {
|
|
1431
|
-
const target = this["__v_raw"];
|
|
1432
|
-
const rawTarget = toRaw(target);
|
|
1433
|
-
const rawKey = toRaw(key);
|
|
1434
|
-
if (!isReadonly2) {
|
|
1435
|
-
if (hasChanged(key, rawKey)) {
|
|
1436
|
-
track(rawTarget, "has", key);
|
|
1437
|
-
}
|
|
1438
|
-
track(rawTarget, "has", rawKey);
|
|
1439
|
-
}
|
|
1440
|
-
return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
|
|
1441
|
-
}
|
|
1442
|
-
function size(target, isReadonly2 = false) {
|
|
1443
|
-
target = target["__v_raw"];
|
|
1444
|
-
!isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
|
|
1445
|
-
return Reflect.get(target, "size", target);
|
|
1446
|
-
}
|
|
1447
|
-
function add(value, _isShallow = false) {
|
|
1448
|
-
if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
|
|
1449
|
-
value = toRaw(value);
|
|
1450
|
-
}
|
|
1451
|
-
const target = toRaw(this);
|
|
1452
|
-
const proto = getProto(target);
|
|
1453
|
-
const hadKey = proto.has.call(target, value);
|
|
1454
|
-
if (!hadKey) {
|
|
1455
|
-
target.add(value);
|
|
1456
|
-
trigger(target, "add", value, value);
|
|
1457
|
-
}
|
|
1458
|
-
return this;
|
|
1459
|
-
}
|
|
1460
|
-
function set(key, value, _isShallow = false) {
|
|
1461
|
-
if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
|
|
1462
|
-
value = toRaw(value);
|
|
1463
|
-
}
|
|
1464
|
-
const target = toRaw(this);
|
|
1465
|
-
const { has: has2, get: get2 } = getProto(target);
|
|
1466
|
-
let hadKey = has2.call(target, key);
|
|
1467
|
-
if (!hadKey) {
|
|
1468
|
-
key = toRaw(key);
|
|
1469
|
-
hadKey = has2.call(target, key);
|
|
1470
|
-
} else {
|
|
1471
|
-
checkIdentityKeys(target, has2, key);
|
|
1472
|
-
}
|
|
1473
|
-
const oldValue = get2.call(target, key);
|
|
1474
|
-
target.set(key, value);
|
|
1475
|
-
if (!hadKey) {
|
|
1476
|
-
trigger(target, "add", key, value);
|
|
1477
|
-
} else if (hasChanged(value, oldValue)) {
|
|
1478
|
-
trigger(target, "set", key, value, oldValue);
|
|
1479
|
-
}
|
|
1480
|
-
return this;
|
|
1481
|
-
}
|
|
1482
|
-
function deleteEntry(key) {
|
|
1483
|
-
const target = toRaw(this);
|
|
1484
|
-
const { has: has2, get: get2 } = getProto(target);
|
|
1485
|
-
let hadKey = has2.call(target, key);
|
|
1486
|
-
if (!hadKey) {
|
|
1487
|
-
key = toRaw(key);
|
|
1488
|
-
hadKey = has2.call(target, key);
|
|
1489
|
-
} else {
|
|
1490
|
-
checkIdentityKeys(target, has2, key);
|
|
1491
|
-
}
|
|
1492
|
-
const oldValue = get2 ? get2.call(target, key) : void 0;
|
|
1493
|
-
const result = target.delete(key);
|
|
1494
|
-
if (hadKey) {
|
|
1495
|
-
trigger(target, "delete", key, void 0, oldValue);
|
|
1496
|
-
}
|
|
1497
|
-
return result;
|
|
1498
|
-
}
|
|
1499
|
-
function clear() {
|
|
1500
|
-
const target = toRaw(this);
|
|
1501
|
-
const hadItems = target.size !== 0;
|
|
1502
|
-
const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
|
|
1503
|
-
const result = target.clear();
|
|
1504
|
-
if (hadItems) {
|
|
1505
|
-
trigger(target, "clear", void 0, void 0, oldTarget);
|
|
1506
|
-
}
|
|
1507
|
-
return result;
|
|
1508
|
-
}
|
|
1509
|
-
function createForEach(isReadonly2, isShallow2) {
|
|
1510
|
-
return function forEach(callback, thisArg) {
|
|
1511
|
-
const observed = this;
|
|
1512
|
-
const target = observed["__v_raw"];
|
|
1513
|
-
const rawTarget = toRaw(target);
|
|
1514
|
-
const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
1515
|
-
!isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
|
|
1516
|
-
return target.forEach((value, key) => {
|
|
1517
|
-
return callback.call(thisArg, wrap(value), wrap(key), observed);
|
|
1518
|
-
});
|
|
1519
|
-
};
|
|
1520
|
-
}
|
|
1521
1410
|
function createIterableMethod(method, isReadonly2, isShallow2) {
|
|
1522
1411
|
return function(...args) {
|
|
1523
1412
|
const target = this["__v_raw"];
|
|
@@ -1560,71 +1449,134 @@ function createReadonlyMethod(type) {
|
|
|
1560
1449
|
return type === "delete" ? false : type === "clear" ? void 0 : this;
|
|
1561
1450
|
};
|
|
1562
1451
|
}
|
|
1563
|
-
function createInstrumentations() {
|
|
1564
|
-
const
|
|
1565
|
-
get(key) {
|
|
1566
|
-
return get(this, key);
|
|
1567
|
-
},
|
|
1568
|
-
get size() {
|
|
1569
|
-
return size(this);
|
|
1570
|
-
},
|
|
1571
|
-
has,
|
|
1572
|
-
add,
|
|
1573
|
-
set,
|
|
1574
|
-
delete: deleteEntry,
|
|
1575
|
-
clear,
|
|
1576
|
-
forEach: createForEach(false, false)
|
|
1577
|
-
};
|
|
1578
|
-
const shallowInstrumentations2 = {
|
|
1579
|
-
get(key) {
|
|
1580
|
-
return get(this, key, false, true);
|
|
1581
|
-
},
|
|
1582
|
-
get size() {
|
|
1583
|
-
return size(this);
|
|
1584
|
-
},
|
|
1585
|
-
has,
|
|
1586
|
-
add(value) {
|
|
1587
|
-
return add.call(this, value, true);
|
|
1588
|
-
},
|
|
1589
|
-
set(key, value) {
|
|
1590
|
-
return set.call(this, key, value, true);
|
|
1591
|
-
},
|
|
1592
|
-
delete: deleteEntry,
|
|
1593
|
-
clear,
|
|
1594
|
-
forEach: createForEach(false, true)
|
|
1595
|
-
};
|
|
1596
|
-
const readonlyInstrumentations2 = {
|
|
1597
|
-
get(key) {
|
|
1598
|
-
return get(this, key, true);
|
|
1599
|
-
},
|
|
1600
|
-
get size() {
|
|
1601
|
-
return size(this, true);
|
|
1602
|
-
},
|
|
1603
|
-
has(key) {
|
|
1604
|
-
return has.call(this, key, true);
|
|
1605
|
-
},
|
|
1606
|
-
add: createReadonlyMethod("add"),
|
|
1607
|
-
set: createReadonlyMethod("set"),
|
|
1608
|
-
delete: createReadonlyMethod("delete"),
|
|
1609
|
-
clear: createReadonlyMethod("clear"),
|
|
1610
|
-
forEach: createForEach(true, false)
|
|
1611
|
-
};
|
|
1612
|
-
const shallowReadonlyInstrumentations2 = {
|
|
1452
|
+
function createInstrumentations(readonly, shallow) {
|
|
1453
|
+
const instrumentations = {
|
|
1613
1454
|
get(key) {
|
|
1614
|
-
|
|
1455
|
+
const target = this["__v_raw"];
|
|
1456
|
+
const rawTarget = toRaw(target);
|
|
1457
|
+
const rawKey = toRaw(key);
|
|
1458
|
+
if (!readonly) {
|
|
1459
|
+
if (hasChanged(key, rawKey)) {
|
|
1460
|
+
track(rawTarget, "get", key);
|
|
1461
|
+
}
|
|
1462
|
+
track(rawTarget, "get", rawKey);
|
|
1463
|
+
}
|
|
1464
|
+
const { has } = getProto(rawTarget);
|
|
1465
|
+
const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
|
|
1466
|
+
if (has.call(rawTarget, key)) {
|
|
1467
|
+
return wrap(target.get(key));
|
|
1468
|
+
} else if (has.call(rawTarget, rawKey)) {
|
|
1469
|
+
return wrap(target.get(rawKey));
|
|
1470
|
+
} else if (target !== rawTarget) {
|
|
1471
|
+
target.get(key);
|
|
1472
|
+
}
|
|
1615
1473
|
},
|
|
1616
1474
|
get size() {
|
|
1617
|
-
|
|
1475
|
+
const target = this["__v_raw"];
|
|
1476
|
+
!readonly && track(toRaw(target), "iterate", ITERATE_KEY);
|
|
1477
|
+
return Reflect.get(target, "size", target);
|
|
1618
1478
|
},
|
|
1619
1479
|
has(key) {
|
|
1620
|
-
|
|
1480
|
+
const target = this["__v_raw"];
|
|
1481
|
+
const rawTarget = toRaw(target);
|
|
1482
|
+
const rawKey = toRaw(key);
|
|
1483
|
+
if (!readonly) {
|
|
1484
|
+
if (hasChanged(key, rawKey)) {
|
|
1485
|
+
track(rawTarget, "has", key);
|
|
1486
|
+
}
|
|
1487
|
+
track(rawTarget, "has", rawKey);
|
|
1488
|
+
}
|
|
1489
|
+
return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
|
|
1621
1490
|
},
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1491
|
+
forEach(callback, thisArg) {
|
|
1492
|
+
const observed = this;
|
|
1493
|
+
const target = observed["__v_raw"];
|
|
1494
|
+
const rawTarget = toRaw(target);
|
|
1495
|
+
const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
|
|
1496
|
+
!readonly && track(rawTarget, "iterate", ITERATE_KEY);
|
|
1497
|
+
return target.forEach((value, key) => {
|
|
1498
|
+
return callback.call(thisArg, wrap(value), wrap(key), observed);
|
|
1499
|
+
});
|
|
1500
|
+
}
|
|
1627
1501
|
};
|
|
1502
|
+
extend(
|
|
1503
|
+
instrumentations,
|
|
1504
|
+
readonly ? {
|
|
1505
|
+
add: createReadonlyMethod("add"),
|
|
1506
|
+
set: createReadonlyMethod("set"),
|
|
1507
|
+
delete: createReadonlyMethod("delete"),
|
|
1508
|
+
clear: createReadonlyMethod("clear")
|
|
1509
|
+
} : {
|
|
1510
|
+
add(value) {
|
|
1511
|
+
if (!shallow && !isShallow(value) && !isReadonly(value)) {
|
|
1512
|
+
value = toRaw(value);
|
|
1513
|
+
}
|
|
1514
|
+
const target = toRaw(this);
|
|
1515
|
+
const proto = getProto(target);
|
|
1516
|
+
const hadKey = proto.has.call(target, value);
|
|
1517
|
+
if (!hadKey) {
|
|
1518
|
+
target.add(value);
|
|
1519
|
+
trigger(target, "add", value, value);
|
|
1520
|
+
}
|
|
1521
|
+
return this;
|
|
1522
|
+
},
|
|
1523
|
+
set(key, value) {
|
|
1524
|
+
if (!shallow && !isShallow(value) && !isReadonly(value)) {
|
|
1525
|
+
value = toRaw(value);
|
|
1526
|
+
}
|
|
1527
|
+
const target = toRaw(this);
|
|
1528
|
+
const { has, get } = getProto(target);
|
|
1529
|
+
let hadKey = has.call(target, key);
|
|
1530
|
+
if (!hadKey) {
|
|
1531
|
+
key = toRaw(key);
|
|
1532
|
+
hadKey = has.call(target, key);
|
|
1533
|
+
} else {
|
|
1534
|
+
checkIdentityKeys(target, has, key);
|
|
1535
|
+
}
|
|
1536
|
+
const oldValue = get.call(target, key);
|
|
1537
|
+
target.set(key, value);
|
|
1538
|
+
if (!hadKey) {
|
|
1539
|
+
trigger(target, "add", key, value);
|
|
1540
|
+
} else if (hasChanged(value, oldValue)) {
|
|
1541
|
+
trigger(target, "set", key, value, oldValue);
|
|
1542
|
+
}
|
|
1543
|
+
return this;
|
|
1544
|
+
},
|
|
1545
|
+
delete(key) {
|
|
1546
|
+
const target = toRaw(this);
|
|
1547
|
+
const { has, get } = getProto(target);
|
|
1548
|
+
let hadKey = has.call(target, key);
|
|
1549
|
+
if (!hadKey) {
|
|
1550
|
+
key = toRaw(key);
|
|
1551
|
+
hadKey = has.call(target, key);
|
|
1552
|
+
} else {
|
|
1553
|
+
checkIdentityKeys(target, has, key);
|
|
1554
|
+
}
|
|
1555
|
+
const oldValue = get ? get.call(target, key) : void 0;
|
|
1556
|
+
const result = target.delete(key);
|
|
1557
|
+
if (hadKey) {
|
|
1558
|
+
trigger(target, "delete", key, void 0, oldValue);
|
|
1559
|
+
}
|
|
1560
|
+
return result;
|
|
1561
|
+
},
|
|
1562
|
+
clear() {
|
|
1563
|
+
const target = toRaw(this);
|
|
1564
|
+
const hadItems = target.size !== 0;
|
|
1565
|
+
const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
|
|
1566
|
+
const result = target.clear();
|
|
1567
|
+
if (hadItems) {
|
|
1568
|
+
trigger(
|
|
1569
|
+
target,
|
|
1570
|
+
"clear",
|
|
1571
|
+
void 0,
|
|
1572
|
+
void 0,
|
|
1573
|
+
oldTarget
|
|
1574
|
+
);
|
|
1575
|
+
}
|
|
1576
|
+
return result;
|
|
1577
|
+
}
|
|
1578
|
+
}
|
|
1579
|
+
);
|
|
1628
1580
|
const iteratorMethods = [
|
|
1629
1581
|
"keys",
|
|
1630
1582
|
"values",
|
|
@@ -1632,30 +1584,12 @@ function createInstrumentations() {
|
|
|
1632
1584
|
Symbol.iterator
|
|
1633
1585
|
];
|
|
1634
1586
|
iteratorMethods.forEach((method) => {
|
|
1635
|
-
|
|
1636
|
-
readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
|
|
1637
|
-
shallowInstrumentations2[method] = createIterableMethod(method, false, true);
|
|
1638
|
-
shallowReadonlyInstrumentations2[method] = createIterableMethod(
|
|
1639
|
-
method,
|
|
1640
|
-
true,
|
|
1641
|
-
true
|
|
1642
|
-
);
|
|
1587
|
+
instrumentations[method] = createIterableMethod(method, readonly, shallow);
|
|
1643
1588
|
});
|
|
1644
|
-
return
|
|
1645
|
-
mutableInstrumentations2,
|
|
1646
|
-
readonlyInstrumentations2,
|
|
1647
|
-
shallowInstrumentations2,
|
|
1648
|
-
shallowReadonlyInstrumentations2
|
|
1649
|
-
];
|
|
1589
|
+
return instrumentations;
|
|
1650
1590
|
}
|
|
1651
|
-
const [
|
|
1652
|
-
mutableInstrumentations,
|
|
1653
|
-
readonlyInstrumentations,
|
|
1654
|
-
shallowInstrumentations,
|
|
1655
|
-
shallowReadonlyInstrumentations
|
|
1656
|
-
] = /* @__PURE__ */ createInstrumentations();
|
|
1657
1591
|
function createInstrumentationGetter(isReadonly2, shallow) {
|
|
1658
|
-
const instrumentations =
|
|
1592
|
+
const instrumentations = createInstrumentations(isReadonly2, shallow);
|
|
1659
1593
|
return (target, key, receiver) => {
|
|
1660
1594
|
if (key === "__v_isReactive") {
|
|
1661
1595
|
return !isReadonly2;
|
|
@@ -1683,9 +1617,9 @@ const readonlyCollectionHandlers = {
|
|
|
1683
1617
|
const shallowReadonlyCollectionHandlers = {
|
|
1684
1618
|
get: /* @__PURE__ */ createInstrumentationGetter(true, true)
|
|
1685
1619
|
};
|
|
1686
|
-
function checkIdentityKeys(target,
|
|
1620
|
+
function checkIdentityKeys(target, has, key) {
|
|
1687
1621
|
const rawKey = toRaw(key);
|
|
1688
|
-
if (rawKey !== key &&
|
|
1622
|
+
if (rawKey !== key && has.call(target, rawKey)) {
|
|
1689
1623
|
const type = toRawType(target);
|
|
1690
1624
|
warn$2(
|
|
1691
1625
|
`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.`
|
|
@@ -3111,7 +3045,7 @@ const TeleportImpl = {
|
|
|
3111
3045
|
}
|
|
3112
3046
|
if (!disabled) {
|
|
3113
3047
|
mount(target, targetAnchor);
|
|
3114
|
-
updateCssVars(n2);
|
|
3048
|
+
updateCssVars(n2, false);
|
|
3115
3049
|
}
|
|
3116
3050
|
} else if (!disabled) {
|
|
3117
3051
|
warn$1(
|
|
@@ -3123,7 +3057,7 @@ const TeleportImpl = {
|
|
|
3123
3057
|
};
|
|
3124
3058
|
if (disabled) {
|
|
3125
3059
|
mount(container, mainAnchor);
|
|
3126
|
-
updateCssVars(n2);
|
|
3060
|
+
updateCssVars(n2, true);
|
|
3127
3061
|
}
|
|
3128
3062
|
if (isTeleportDeferred(n2.props)) {
|
|
3129
3063
|
queuePostRenderEffect(mountToTarget, parentSuspense);
|
|
@@ -3213,7 +3147,7 @@ const TeleportImpl = {
|
|
|
3213
3147
|
);
|
|
3214
3148
|
}
|
|
3215
3149
|
}
|
|
3216
|
-
updateCssVars(n2);
|
|
3150
|
+
updateCssVars(n2, disabled);
|
|
3217
3151
|
}
|
|
3218
3152
|
},
|
|
3219
3153
|
remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
@@ -3281,9 +3215,10 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
3281
3215
|
querySelector
|
|
3282
3216
|
);
|
|
3283
3217
|
if (target) {
|
|
3218
|
+
const disabled = isTeleportDisabled(vnode.props);
|
|
3284
3219
|
const targetNode = target._lpa || target.firstChild;
|
|
3285
3220
|
if (vnode.shapeFlag & 16) {
|
|
3286
|
-
if (
|
|
3221
|
+
if (disabled) {
|
|
3287
3222
|
vnode.anchor = hydrateChildren(
|
|
3288
3223
|
nextSibling(node),
|
|
3289
3224
|
vnode,
|
|
@@ -3324,16 +3259,23 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
3324
3259
|
);
|
|
3325
3260
|
}
|
|
3326
3261
|
}
|
|
3327
|
-
updateCssVars(vnode);
|
|
3262
|
+
updateCssVars(vnode, disabled);
|
|
3328
3263
|
}
|
|
3329
3264
|
return vnode.anchor && nextSibling(vnode.anchor);
|
|
3330
3265
|
}
|
|
3331
3266
|
const Teleport = TeleportImpl;
|
|
3332
|
-
function updateCssVars(vnode) {
|
|
3267
|
+
function updateCssVars(vnode, isDisabled) {
|
|
3333
3268
|
const ctx = vnode.ctx;
|
|
3334
3269
|
if (ctx && ctx.ut) {
|
|
3335
|
-
let node
|
|
3336
|
-
|
|
3270
|
+
let node, anchor;
|
|
3271
|
+
if (isDisabled) {
|
|
3272
|
+
node = vnode.el;
|
|
3273
|
+
anchor = vnode.anchor;
|
|
3274
|
+
} else {
|
|
3275
|
+
node = vnode.targetStart;
|
|
3276
|
+
anchor = vnode.targetAnchor;
|
|
3277
|
+
}
|
|
3278
|
+
while (node && node !== anchor) {
|
|
3337
3279
|
if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid);
|
|
3338
3280
|
node = node.nextSibling;
|
|
3339
3281
|
}
|
|
@@ -3783,8 +3725,15 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
3783
3725
|
const setupState = owner.setupState;
|
|
3784
3726
|
const rawSetupState = toRaw(setupState);
|
|
3785
3727
|
const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {
|
|
3786
|
-
|
|
3787
|
-
|
|
3728
|
+
{
|
|
3729
|
+
if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
|
|
3730
|
+
warn$1(
|
|
3731
|
+
`Template ref "${key}" used on a non-ref value. It will not work in the production build.`
|
|
3732
|
+
);
|
|
3733
|
+
}
|
|
3734
|
+
if (knownTemplateRefs.has(rawSetupState[key])) {
|
|
3735
|
+
return false;
|
|
3736
|
+
}
|
|
3788
3737
|
}
|
|
3789
3738
|
return hasOwn(rawSetupState, key);
|
|
3790
3739
|
};
|
|
@@ -4081,7 +4030,11 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4081
4030
|
}
|
|
4082
4031
|
let needCallTransitionHooks = false;
|
|
4083
4032
|
if (isTemplateNode(el)) {
|
|
4084
|
-
needCallTransitionHooks = needTransition(
|
|
4033
|
+
needCallTransitionHooks = needTransition(
|
|
4034
|
+
null,
|
|
4035
|
+
// no need check parentSuspense in hydration
|
|
4036
|
+
transition
|
|
4037
|
+
) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
|
|
4085
4038
|
const content = el.content.firstChild;
|
|
4086
4039
|
if (needCallTransitionHooks) {
|
|
4087
4040
|
transition.beforeEnter(content);
|
|
@@ -4474,6 +4427,8 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
4474
4427
|
}
|
|
4475
4428
|
}
|
|
4476
4429
|
|
|
4430
|
+
const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
|
|
4431
|
+
const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
|
|
4477
4432
|
const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
|
|
4478
4433
|
const id = requestIdleCallback(hydrate, { timeout });
|
|
4479
4434
|
return () => cancelIdleCallback(id);
|
|
@@ -5176,12 +5131,13 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
|
5176
5131
|
}
|
|
5177
5132
|
openBlock();
|
|
5178
5133
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
5134
|
+
const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch
|
|
5135
|
+
// key attached in the `createSlots` helper, respect that
|
|
5136
|
+
validSlotContent && validSlotContent.key;
|
|
5179
5137
|
const rendered = createBlock(
|
|
5180
5138
|
Fragment,
|
|
5181
5139
|
{
|
|
5182
|
-
key: (
|
|
5183
|
-
// key attached in the `createSlots` helper, respect that
|
|
5184
|
-
validSlotContent && validSlotContent.key || `_${name}`) + // #7256 force differentiate fallback content from actual content
|
|
5140
|
+
key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
|
|
5185
5141
|
(!validSlotContent && fallback ? "_fb" : "")
|
|
5186
5142
|
},
|
|
5187
5143
|
validSlotContent || (fallback ? fallback() : []),
|
|
@@ -6539,6 +6495,7 @@ function getType(ctor) {
|
|
|
6539
6495
|
function validateProps(rawProps, props, instance) {
|
|
6540
6496
|
const resolvedValues = toRaw(props);
|
|
6541
6497
|
const options = instance.propsOptions[0];
|
|
6498
|
+
const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key));
|
|
6542
6499
|
for (const key in options) {
|
|
6543
6500
|
let opt = options[key];
|
|
6544
6501
|
if (opt == null) continue;
|
|
@@ -6547,7 +6504,7 @@ function validateProps(rawProps, props, instance) {
|
|
|
6547
6504
|
resolvedValues[key],
|
|
6548
6505
|
opt,
|
|
6549
6506
|
shallowReadonly(resolvedValues) ,
|
|
6550
|
-
!
|
|
6507
|
+
!camelizePropsKey.includes(key)
|
|
6551
6508
|
);
|
|
6552
6509
|
}
|
|
6553
6510
|
}
|
|
@@ -8327,14 +8284,13 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
8327
8284
|
}
|
|
8328
8285
|
const baseWatchOptions = extend({}, options);
|
|
8329
8286
|
baseWatchOptions.onWarn = warn$1;
|
|
8287
|
+
const runsImmediately = cb && immediate || !cb && flush !== "post";
|
|
8330
8288
|
let ssrCleanup;
|
|
8331
8289
|
if (isInSSRComponentSetup) {
|
|
8332
8290
|
if (flush === "sync") {
|
|
8333
8291
|
const ctx = useSSRContext();
|
|
8334
8292
|
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
8335
|
-
} else if (!
|
|
8336
|
-
baseWatchOptions.once = true;
|
|
8337
|
-
} else {
|
|
8293
|
+
} else if (!runsImmediately) {
|
|
8338
8294
|
const watchStopHandle = () => {
|
|
8339
8295
|
};
|
|
8340
8296
|
watchStopHandle.stop = NOOP;
|
|
@@ -8373,7 +8329,13 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
8373
8329
|
}
|
|
8374
8330
|
};
|
|
8375
8331
|
const watchHandle = watch$1(source, cb, baseWatchOptions);
|
|
8376
|
-
if (
|
|
8332
|
+
if (isInSSRComponentSetup) {
|
|
8333
|
+
if (ssrCleanup) {
|
|
8334
|
+
ssrCleanup.push(watchHandle);
|
|
8335
|
+
} else if (runsImmediately) {
|
|
8336
|
+
watchHandle();
|
|
8337
|
+
}
|
|
8338
|
+
}
|
|
8377
8339
|
return watchHandle;
|
|
8378
8340
|
}
|
|
8379
8341
|
function instanceWatch(source, value, options) {
|
|
@@ -8408,19 +8370,19 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
8408
8370
|
warn$1(`useModel() called without active instance.`);
|
|
8409
8371
|
return ref();
|
|
8410
8372
|
}
|
|
8411
|
-
|
|
8373
|
+
const camelizedName = camelize(name);
|
|
8374
|
+
if (!i.propsOptions[0][camelizedName]) {
|
|
8412
8375
|
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
|
8413
8376
|
return ref();
|
|
8414
8377
|
}
|
|
8415
|
-
const camelizedName = camelize(name);
|
|
8416
8378
|
const hyphenatedName = hyphenate(name);
|
|
8417
|
-
const modifiers = getModelModifiers(props,
|
|
8379
|
+
const modifiers = getModelModifiers(props, camelizedName);
|
|
8418
8380
|
const res = customRef((track, trigger) => {
|
|
8419
8381
|
let localValue;
|
|
8420
8382
|
let prevSetValue = EMPTY_OBJ;
|
|
8421
8383
|
let prevEmittedValue;
|
|
8422
8384
|
watchSyncEffect(() => {
|
|
8423
|
-
const propValue = props[
|
|
8385
|
+
const propValue = props[camelizedName];
|
|
8424
8386
|
if (hasChanged(localValue, propValue)) {
|
|
8425
8387
|
localValue = propValue;
|
|
8426
8388
|
trigger();
|
|
@@ -10047,9 +10009,9 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
10047
10009
|
}
|
|
10048
10010
|
const { setup } = Component;
|
|
10049
10011
|
if (setup) {
|
|
10012
|
+
pauseTracking();
|
|
10050
10013
|
const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
|
|
10051
10014
|
const reset = setCurrentInstance(instance);
|
|
10052
|
-
pauseTracking();
|
|
10053
10015
|
const setupResult = callWithErrorHandling(
|
|
10054
10016
|
setup,
|
|
10055
10017
|
instance,
|
|
@@ -10059,10 +10021,13 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
10059
10021
|
setupContext
|
|
10060
10022
|
]
|
|
10061
10023
|
);
|
|
10024
|
+
const isAsyncSetup = isPromise(setupResult);
|
|
10062
10025
|
resetTracking();
|
|
10063
10026
|
reset();
|
|
10064
|
-
if (
|
|
10065
|
-
|
|
10027
|
+
if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) {
|
|
10028
|
+
markAsyncBoundary(instance);
|
|
10029
|
+
}
|
|
10030
|
+
if (isAsyncSetup) {
|
|
10066
10031
|
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
10067
10032
|
if (isSSR) {
|
|
10068
10033
|
return setupResult.then((resolvedResult) => {
|
|
@@ -10525,7 +10490,7 @@ function isMemoSame(cached, memo) {
|
|
|
10525
10490
|
return true;
|
|
10526
10491
|
}
|
|
10527
10492
|
|
|
10528
|
-
const version = "3.5.
|
|
10493
|
+
const version = "3.5.12";
|
|
10529
10494
|
const warn = warn$1 ;
|
|
10530
10495
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10531
10496
|
const devtools = devtools$1 ;
|
|
@@ -11158,7 +11123,7 @@ function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBoolean
|
|
|
11158
11123
|
}
|
|
11159
11124
|
}
|
|
11160
11125
|
|
|
11161
|
-
function patchDOMProp(el, key, value, parentComponent) {
|
|
11126
|
+
function patchDOMProp(el, key, value, parentComponent, attrName) {
|
|
11162
11127
|
if (key === "innerHTML" || key === "textContent") {
|
|
11163
11128
|
if (value != null) {
|
|
11164
11129
|
el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
|
|
@@ -11206,7 +11171,7 @@ function patchDOMProp(el, key, value, parentComponent) {
|
|
|
11206
11171
|
);
|
|
11207
11172
|
}
|
|
11208
11173
|
}
|
|
11209
|
-
needRemove && el.removeAttribute(key);
|
|
11174
|
+
needRemove && el.removeAttribute(attrName || key);
|
|
11210
11175
|
}
|
|
11211
11176
|
|
|
11212
11177
|
function addEventListener(el, event, handler, options) {
|
|
@@ -11316,7 +11281,7 @@ const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) =>
|
|
|
11316
11281
|
// #11081 force set props for possible async custom element
|
|
11317
11282
|
el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))
|
|
11318
11283
|
) {
|
|
11319
|
-
patchDOMProp(el, camelize(key), nextValue);
|
|
11284
|
+
patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
|
|
11320
11285
|
} else {
|
|
11321
11286
|
if (key === "true-value") {
|
|
11322
11287
|
el._trueValue = nextValue;
|
|
@@ -12034,7 +11999,7 @@ const vModelCheckbox = {
|
|
|
12034
11999
|
setChecked(el, binding, vnode);
|
|
12035
12000
|
}
|
|
12036
12001
|
};
|
|
12037
|
-
function setChecked(el, { value }, vnode) {
|
|
12002
|
+
function setChecked(el, { value, oldValue }, vnode) {
|
|
12038
12003
|
el._modelValue = value;
|
|
12039
12004
|
let checked;
|
|
12040
12005
|
if (isArray(value)) {
|
|
@@ -12042,6 +12007,7 @@ function setChecked(el, { value }, vnode) {
|
|
|
12042
12007
|
} else if (isSet(value)) {
|
|
12043
12008
|
checked = value.has(vnode.props.value);
|
|
12044
12009
|
} else {
|
|
12010
|
+
if (value === oldValue) return;
|
|
12045
12011
|
checked = looseEqual(value, getCheckboxValue(el, true));
|
|
12046
12012
|
}
|
|
12047
12013
|
if (el.checked !== checked) {
|
|
@@ -14533,6 +14499,9 @@ function getLoc(start, end) {
|
|
|
14533
14499
|
source: end == null ? end : getSlice(start, end)
|
|
14534
14500
|
};
|
|
14535
14501
|
}
|
|
14502
|
+
function cloneLoc(loc) {
|
|
14503
|
+
return getLoc(loc.start.offset, loc.end.offset);
|
|
14504
|
+
}
|
|
14536
14505
|
function setLocEnd(loc, end) {
|
|
14537
14506
|
loc.end = tokenizer.getPos(end);
|
|
14538
14507
|
loc.source = getSlice(loc.start.offset, end);
|
|
@@ -15877,7 +15846,7 @@ function processIf(node, dir, context, processCodegen) {
|
|
|
15877
15846
|
const branch = createIfBranch(node, dir);
|
|
15878
15847
|
const ifNode = {
|
|
15879
15848
|
type: 9,
|
|
15880
|
-
loc: node.loc,
|
|
15849
|
+
loc: cloneLoc(node.loc),
|
|
15881
15850
|
branches: [branch]
|
|
15882
15851
|
};
|
|
15883
15852
|
context.replaceNode(ifNode);
|