@vue/compat 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 +204 -235
- package/dist/vue.cjs.prod.js +180 -221
- package/dist/vue.esm-browser.js +203 -234
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +203 -234
- package/dist/vue.global.js +194 -230
- package/dist/vue.global.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +199 -233
- package/dist/vue.runtime.esm-browser.prod.js +2 -2
- package/dist/vue.runtime.esm-bundler.js +199 -233
- package/dist/vue.runtime.global.js +190 -229
- package/dist/vue.runtime.global.prod.js +2 -2
- package/package.json +2 -2
package/dist/vue.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.
|
|
2
|
+
* @vue/compat v3.5.12
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -816,16 +816,16 @@ function removeSub(link, soft = false) {
|
|
|
816
816
|
nextSub.prevSub = prevSub;
|
|
817
817
|
link.nextSub = void 0;
|
|
818
818
|
}
|
|
819
|
-
if (dep.subs === link) {
|
|
820
|
-
dep.subs = prevSub;
|
|
821
|
-
}
|
|
822
819
|
if (dep.subsHead === link) {
|
|
823
820
|
dep.subsHead = nextSub;
|
|
824
821
|
}
|
|
825
|
-
if (
|
|
826
|
-
dep.
|
|
827
|
-
|
|
828
|
-
|
|
822
|
+
if (dep.subs === link) {
|
|
823
|
+
dep.subs = prevSub;
|
|
824
|
+
if (!prevSub && dep.computed) {
|
|
825
|
+
dep.computed.flags &= ~4;
|
|
826
|
+
for (let l = dep.computed.deps; l; l = l.nextDep) {
|
|
827
|
+
removeSub(l, true);
|
|
828
|
+
}
|
|
829
829
|
}
|
|
830
830
|
}
|
|
831
831
|
if (!soft && !--dep.sc && dep.map) {
|
|
@@ -1085,7 +1085,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
1085
1085
|
}
|
|
1086
1086
|
});
|
|
1087
1087
|
} else {
|
|
1088
|
-
if (key !== void 0) {
|
|
1088
|
+
if (key !== void 0 || depsMap.has(void 0)) {
|
|
1089
1089
|
run(depsMap.get(key));
|
|
1090
1090
|
}
|
|
1091
1091
|
if (isArrayIndex) {
|
|
@@ -1460,117 +1460,6 @@ const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true
|
|
|
1460
1460
|
|
|
1461
1461
|
const toShallow = (value) => value;
|
|
1462
1462
|
const getProto = (v) => Reflect.getPrototypeOf(v);
|
|
1463
|
-
function get(target, key, isReadonly2 = false, isShallow2 = false) {
|
|
1464
|
-
target = target["__v_raw"];
|
|
1465
|
-
const rawTarget = toRaw(target);
|
|
1466
|
-
const rawKey = toRaw(key);
|
|
1467
|
-
if (!isReadonly2) {
|
|
1468
|
-
if (hasChanged(key, rawKey)) {
|
|
1469
|
-
track(rawTarget, "get", key);
|
|
1470
|
-
}
|
|
1471
|
-
track(rawTarget, "get", rawKey);
|
|
1472
|
-
}
|
|
1473
|
-
const { has: has2 } = getProto(rawTarget);
|
|
1474
|
-
const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
1475
|
-
if (has2.call(rawTarget, key)) {
|
|
1476
|
-
return wrap(target.get(key));
|
|
1477
|
-
} else if (has2.call(rawTarget, rawKey)) {
|
|
1478
|
-
return wrap(target.get(rawKey));
|
|
1479
|
-
} else if (target !== rawTarget) {
|
|
1480
|
-
target.get(key);
|
|
1481
|
-
}
|
|
1482
|
-
}
|
|
1483
|
-
function has(key, isReadonly2 = false) {
|
|
1484
|
-
const target = this["__v_raw"];
|
|
1485
|
-
const rawTarget = toRaw(target);
|
|
1486
|
-
const rawKey = toRaw(key);
|
|
1487
|
-
if (!isReadonly2) {
|
|
1488
|
-
if (hasChanged(key, rawKey)) {
|
|
1489
|
-
track(rawTarget, "has", key);
|
|
1490
|
-
}
|
|
1491
|
-
track(rawTarget, "has", rawKey);
|
|
1492
|
-
}
|
|
1493
|
-
return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
|
|
1494
|
-
}
|
|
1495
|
-
function size(target, isReadonly2 = false) {
|
|
1496
|
-
target = target["__v_raw"];
|
|
1497
|
-
!isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
|
|
1498
|
-
return Reflect.get(target, "size", target);
|
|
1499
|
-
}
|
|
1500
|
-
function add(value, _isShallow = false) {
|
|
1501
|
-
if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
|
|
1502
|
-
value = toRaw(value);
|
|
1503
|
-
}
|
|
1504
|
-
const target = toRaw(this);
|
|
1505
|
-
const proto = getProto(target);
|
|
1506
|
-
const hadKey = proto.has.call(target, value);
|
|
1507
|
-
if (!hadKey) {
|
|
1508
|
-
target.add(value);
|
|
1509
|
-
trigger(target, "add", value, value);
|
|
1510
|
-
}
|
|
1511
|
-
return this;
|
|
1512
|
-
}
|
|
1513
|
-
function set(key, value, _isShallow = false) {
|
|
1514
|
-
if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
|
|
1515
|
-
value = toRaw(value);
|
|
1516
|
-
}
|
|
1517
|
-
const target = toRaw(this);
|
|
1518
|
-
const { has: has2, get: get2 } = getProto(target);
|
|
1519
|
-
let hadKey = has2.call(target, key);
|
|
1520
|
-
if (!hadKey) {
|
|
1521
|
-
key = toRaw(key);
|
|
1522
|
-
hadKey = has2.call(target, key);
|
|
1523
|
-
} else {
|
|
1524
|
-
checkIdentityKeys(target, has2, key);
|
|
1525
|
-
}
|
|
1526
|
-
const oldValue = get2.call(target, key);
|
|
1527
|
-
target.set(key, value);
|
|
1528
|
-
if (!hadKey) {
|
|
1529
|
-
trigger(target, "add", key, value);
|
|
1530
|
-
} else if (hasChanged(value, oldValue)) {
|
|
1531
|
-
trigger(target, "set", key, value, oldValue);
|
|
1532
|
-
}
|
|
1533
|
-
return this;
|
|
1534
|
-
}
|
|
1535
|
-
function deleteEntry(key) {
|
|
1536
|
-
const target = toRaw(this);
|
|
1537
|
-
const { has: has2, get: get2 } = getProto(target);
|
|
1538
|
-
let hadKey = has2.call(target, key);
|
|
1539
|
-
if (!hadKey) {
|
|
1540
|
-
key = toRaw(key);
|
|
1541
|
-
hadKey = has2.call(target, key);
|
|
1542
|
-
} else {
|
|
1543
|
-
checkIdentityKeys(target, has2, key);
|
|
1544
|
-
}
|
|
1545
|
-
const oldValue = get2 ? get2.call(target, key) : void 0;
|
|
1546
|
-
const result = target.delete(key);
|
|
1547
|
-
if (hadKey) {
|
|
1548
|
-
trigger(target, "delete", key, void 0, oldValue);
|
|
1549
|
-
}
|
|
1550
|
-
return result;
|
|
1551
|
-
}
|
|
1552
|
-
function clear() {
|
|
1553
|
-
const target = toRaw(this);
|
|
1554
|
-
const hadItems = target.size !== 0;
|
|
1555
|
-
const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
|
|
1556
|
-
const result = target.clear();
|
|
1557
|
-
if (hadItems) {
|
|
1558
|
-
trigger(target, "clear", void 0, void 0, oldTarget);
|
|
1559
|
-
}
|
|
1560
|
-
return result;
|
|
1561
|
-
}
|
|
1562
|
-
function createForEach(isReadonly2, isShallow2) {
|
|
1563
|
-
return function forEach(callback, thisArg) {
|
|
1564
|
-
const observed = this;
|
|
1565
|
-
const target = observed["__v_raw"];
|
|
1566
|
-
const rawTarget = toRaw(target);
|
|
1567
|
-
const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
1568
|
-
!isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
|
|
1569
|
-
return target.forEach((value, key) => {
|
|
1570
|
-
return callback.call(thisArg, wrap(value), wrap(key), observed);
|
|
1571
|
-
});
|
|
1572
|
-
};
|
|
1573
|
-
}
|
|
1574
1463
|
function createIterableMethod(method, isReadonly2, isShallow2) {
|
|
1575
1464
|
return function(...args) {
|
|
1576
1465
|
const target = this["__v_raw"];
|
|
@@ -1613,71 +1502,134 @@ function createReadonlyMethod(type) {
|
|
|
1613
1502
|
return type === "delete" ? false : type === "clear" ? void 0 : this;
|
|
1614
1503
|
};
|
|
1615
1504
|
}
|
|
1616
|
-
function createInstrumentations() {
|
|
1617
|
-
const
|
|
1618
|
-
get(key) {
|
|
1619
|
-
return get(this, key);
|
|
1620
|
-
},
|
|
1621
|
-
get size() {
|
|
1622
|
-
return size(this);
|
|
1623
|
-
},
|
|
1624
|
-
has,
|
|
1625
|
-
add,
|
|
1626
|
-
set,
|
|
1627
|
-
delete: deleteEntry,
|
|
1628
|
-
clear,
|
|
1629
|
-
forEach: createForEach(false, false)
|
|
1630
|
-
};
|
|
1631
|
-
const shallowInstrumentations2 = {
|
|
1632
|
-
get(key) {
|
|
1633
|
-
return get(this, key, false, true);
|
|
1634
|
-
},
|
|
1635
|
-
get size() {
|
|
1636
|
-
return size(this);
|
|
1637
|
-
},
|
|
1638
|
-
has,
|
|
1639
|
-
add(value) {
|
|
1640
|
-
return add.call(this, value, true);
|
|
1641
|
-
},
|
|
1642
|
-
set(key, value) {
|
|
1643
|
-
return set.call(this, key, value, true);
|
|
1644
|
-
},
|
|
1645
|
-
delete: deleteEntry,
|
|
1646
|
-
clear,
|
|
1647
|
-
forEach: createForEach(false, true)
|
|
1648
|
-
};
|
|
1649
|
-
const readonlyInstrumentations2 = {
|
|
1650
|
-
get(key) {
|
|
1651
|
-
return get(this, key, true);
|
|
1652
|
-
},
|
|
1653
|
-
get size() {
|
|
1654
|
-
return size(this, true);
|
|
1655
|
-
},
|
|
1656
|
-
has(key) {
|
|
1657
|
-
return has.call(this, key, true);
|
|
1658
|
-
},
|
|
1659
|
-
add: createReadonlyMethod("add"),
|
|
1660
|
-
set: createReadonlyMethod("set"),
|
|
1661
|
-
delete: createReadonlyMethod("delete"),
|
|
1662
|
-
clear: createReadonlyMethod("clear"),
|
|
1663
|
-
forEach: createForEach(true, false)
|
|
1664
|
-
};
|
|
1665
|
-
const shallowReadonlyInstrumentations2 = {
|
|
1505
|
+
function createInstrumentations(readonly, shallow) {
|
|
1506
|
+
const instrumentations = {
|
|
1666
1507
|
get(key) {
|
|
1667
|
-
|
|
1508
|
+
const target = this["__v_raw"];
|
|
1509
|
+
const rawTarget = toRaw(target);
|
|
1510
|
+
const rawKey = toRaw(key);
|
|
1511
|
+
if (!readonly) {
|
|
1512
|
+
if (hasChanged(key, rawKey)) {
|
|
1513
|
+
track(rawTarget, "get", key);
|
|
1514
|
+
}
|
|
1515
|
+
track(rawTarget, "get", rawKey);
|
|
1516
|
+
}
|
|
1517
|
+
const { has } = getProto(rawTarget);
|
|
1518
|
+
const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
|
|
1519
|
+
if (has.call(rawTarget, key)) {
|
|
1520
|
+
return wrap(target.get(key));
|
|
1521
|
+
} else if (has.call(rawTarget, rawKey)) {
|
|
1522
|
+
return wrap(target.get(rawKey));
|
|
1523
|
+
} else if (target !== rawTarget) {
|
|
1524
|
+
target.get(key);
|
|
1525
|
+
}
|
|
1668
1526
|
},
|
|
1669
1527
|
get size() {
|
|
1670
|
-
|
|
1528
|
+
const target = this["__v_raw"];
|
|
1529
|
+
!readonly && track(toRaw(target), "iterate", ITERATE_KEY);
|
|
1530
|
+
return Reflect.get(target, "size", target);
|
|
1671
1531
|
},
|
|
1672
1532
|
has(key) {
|
|
1673
|
-
|
|
1533
|
+
const target = this["__v_raw"];
|
|
1534
|
+
const rawTarget = toRaw(target);
|
|
1535
|
+
const rawKey = toRaw(key);
|
|
1536
|
+
if (!readonly) {
|
|
1537
|
+
if (hasChanged(key, rawKey)) {
|
|
1538
|
+
track(rawTarget, "has", key);
|
|
1539
|
+
}
|
|
1540
|
+
track(rawTarget, "has", rawKey);
|
|
1541
|
+
}
|
|
1542
|
+
return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
|
|
1674
1543
|
},
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1544
|
+
forEach(callback, thisArg) {
|
|
1545
|
+
const observed = this;
|
|
1546
|
+
const target = observed["__v_raw"];
|
|
1547
|
+
const rawTarget = toRaw(target);
|
|
1548
|
+
const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
|
|
1549
|
+
!readonly && track(rawTarget, "iterate", ITERATE_KEY);
|
|
1550
|
+
return target.forEach((value, key) => {
|
|
1551
|
+
return callback.call(thisArg, wrap(value), wrap(key), observed);
|
|
1552
|
+
});
|
|
1553
|
+
}
|
|
1680
1554
|
};
|
|
1555
|
+
extend(
|
|
1556
|
+
instrumentations,
|
|
1557
|
+
readonly ? {
|
|
1558
|
+
add: createReadonlyMethod("add"),
|
|
1559
|
+
set: createReadonlyMethod("set"),
|
|
1560
|
+
delete: createReadonlyMethod("delete"),
|
|
1561
|
+
clear: createReadonlyMethod("clear")
|
|
1562
|
+
} : {
|
|
1563
|
+
add(value) {
|
|
1564
|
+
if (!shallow && !isShallow(value) && !isReadonly(value)) {
|
|
1565
|
+
value = toRaw(value);
|
|
1566
|
+
}
|
|
1567
|
+
const target = toRaw(this);
|
|
1568
|
+
const proto = getProto(target);
|
|
1569
|
+
const hadKey = proto.has.call(target, value);
|
|
1570
|
+
if (!hadKey) {
|
|
1571
|
+
target.add(value);
|
|
1572
|
+
trigger(target, "add", value, value);
|
|
1573
|
+
}
|
|
1574
|
+
return this;
|
|
1575
|
+
},
|
|
1576
|
+
set(key, value) {
|
|
1577
|
+
if (!shallow && !isShallow(value) && !isReadonly(value)) {
|
|
1578
|
+
value = toRaw(value);
|
|
1579
|
+
}
|
|
1580
|
+
const target = toRaw(this);
|
|
1581
|
+
const { has, get } = getProto(target);
|
|
1582
|
+
let hadKey = has.call(target, key);
|
|
1583
|
+
if (!hadKey) {
|
|
1584
|
+
key = toRaw(key);
|
|
1585
|
+
hadKey = has.call(target, key);
|
|
1586
|
+
} else {
|
|
1587
|
+
checkIdentityKeys(target, has, key);
|
|
1588
|
+
}
|
|
1589
|
+
const oldValue = get.call(target, key);
|
|
1590
|
+
target.set(key, value);
|
|
1591
|
+
if (!hadKey) {
|
|
1592
|
+
trigger(target, "add", key, value);
|
|
1593
|
+
} else if (hasChanged(value, oldValue)) {
|
|
1594
|
+
trigger(target, "set", key, value, oldValue);
|
|
1595
|
+
}
|
|
1596
|
+
return this;
|
|
1597
|
+
},
|
|
1598
|
+
delete(key) {
|
|
1599
|
+
const target = toRaw(this);
|
|
1600
|
+
const { has, get } = getProto(target);
|
|
1601
|
+
let hadKey = has.call(target, key);
|
|
1602
|
+
if (!hadKey) {
|
|
1603
|
+
key = toRaw(key);
|
|
1604
|
+
hadKey = has.call(target, key);
|
|
1605
|
+
} else {
|
|
1606
|
+
checkIdentityKeys(target, has, key);
|
|
1607
|
+
}
|
|
1608
|
+
const oldValue = get ? get.call(target, key) : void 0;
|
|
1609
|
+
const result = target.delete(key);
|
|
1610
|
+
if (hadKey) {
|
|
1611
|
+
trigger(target, "delete", key, void 0, oldValue);
|
|
1612
|
+
}
|
|
1613
|
+
return result;
|
|
1614
|
+
},
|
|
1615
|
+
clear() {
|
|
1616
|
+
const target = toRaw(this);
|
|
1617
|
+
const hadItems = target.size !== 0;
|
|
1618
|
+
const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
|
|
1619
|
+
const result = target.clear();
|
|
1620
|
+
if (hadItems) {
|
|
1621
|
+
trigger(
|
|
1622
|
+
target,
|
|
1623
|
+
"clear",
|
|
1624
|
+
void 0,
|
|
1625
|
+
void 0,
|
|
1626
|
+
oldTarget
|
|
1627
|
+
);
|
|
1628
|
+
}
|
|
1629
|
+
return result;
|
|
1630
|
+
}
|
|
1631
|
+
}
|
|
1632
|
+
);
|
|
1681
1633
|
const iteratorMethods = [
|
|
1682
1634
|
"keys",
|
|
1683
1635
|
"values",
|
|
@@ -1685,30 +1637,12 @@ function createInstrumentations() {
|
|
|
1685
1637
|
Symbol.iterator
|
|
1686
1638
|
];
|
|
1687
1639
|
iteratorMethods.forEach((method) => {
|
|
1688
|
-
|
|
1689
|
-
readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
|
|
1690
|
-
shallowInstrumentations2[method] = createIterableMethod(method, false, true);
|
|
1691
|
-
shallowReadonlyInstrumentations2[method] = createIterableMethod(
|
|
1692
|
-
method,
|
|
1693
|
-
true,
|
|
1694
|
-
true
|
|
1695
|
-
);
|
|
1640
|
+
instrumentations[method] = createIterableMethod(method, readonly, shallow);
|
|
1696
1641
|
});
|
|
1697
|
-
return
|
|
1698
|
-
mutableInstrumentations2,
|
|
1699
|
-
readonlyInstrumentations2,
|
|
1700
|
-
shallowInstrumentations2,
|
|
1701
|
-
shallowReadonlyInstrumentations2
|
|
1702
|
-
];
|
|
1642
|
+
return instrumentations;
|
|
1703
1643
|
}
|
|
1704
|
-
const [
|
|
1705
|
-
mutableInstrumentations,
|
|
1706
|
-
readonlyInstrumentations,
|
|
1707
|
-
shallowInstrumentations,
|
|
1708
|
-
shallowReadonlyInstrumentations
|
|
1709
|
-
] = /* @__PURE__ */ createInstrumentations();
|
|
1710
1644
|
function createInstrumentationGetter(isReadonly2, shallow) {
|
|
1711
|
-
const instrumentations =
|
|
1645
|
+
const instrumentations = createInstrumentations(isReadonly2, shallow);
|
|
1712
1646
|
return (target, key, receiver) => {
|
|
1713
1647
|
if (key === "__v_isReactive") {
|
|
1714
1648
|
return !isReadonly2;
|
|
@@ -1736,9 +1670,9 @@ const readonlyCollectionHandlers = {
|
|
|
1736
1670
|
const shallowReadonlyCollectionHandlers = {
|
|
1737
1671
|
get: /* @__PURE__ */ createInstrumentationGetter(true, true)
|
|
1738
1672
|
};
|
|
1739
|
-
function checkIdentityKeys(target,
|
|
1673
|
+
function checkIdentityKeys(target, has, key) {
|
|
1740
1674
|
const rawKey = toRaw(key);
|
|
1741
|
-
if (rawKey !== key &&
|
|
1675
|
+
if (rawKey !== key && has.call(target, rawKey)) {
|
|
1742
1676
|
const type = toRawType(target);
|
|
1743
1677
|
warn$2(
|
|
1744
1678
|
`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.`
|
|
@@ -3692,7 +3626,7 @@ const TeleportImpl = {
|
|
|
3692
3626
|
}
|
|
3693
3627
|
if (!disabled) {
|
|
3694
3628
|
mount(target, targetAnchor);
|
|
3695
|
-
updateCssVars(n2);
|
|
3629
|
+
updateCssVars(n2, false);
|
|
3696
3630
|
}
|
|
3697
3631
|
} else if (!disabled) {
|
|
3698
3632
|
warn$1(
|
|
@@ -3704,7 +3638,7 @@ const TeleportImpl = {
|
|
|
3704
3638
|
};
|
|
3705
3639
|
if (disabled) {
|
|
3706
3640
|
mount(container, mainAnchor);
|
|
3707
|
-
updateCssVars(n2);
|
|
3641
|
+
updateCssVars(n2, true);
|
|
3708
3642
|
}
|
|
3709
3643
|
if (isTeleportDeferred(n2.props)) {
|
|
3710
3644
|
queuePostRenderEffect(mountToTarget, parentSuspense);
|
|
@@ -3794,7 +3728,7 @@ const TeleportImpl = {
|
|
|
3794
3728
|
);
|
|
3795
3729
|
}
|
|
3796
3730
|
}
|
|
3797
|
-
updateCssVars(n2);
|
|
3731
|
+
updateCssVars(n2, disabled);
|
|
3798
3732
|
}
|
|
3799
3733
|
},
|
|
3800
3734
|
remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
@@ -3862,9 +3796,10 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
3862
3796
|
querySelector
|
|
3863
3797
|
);
|
|
3864
3798
|
if (target) {
|
|
3799
|
+
const disabled = isTeleportDisabled(vnode.props);
|
|
3865
3800
|
const targetNode = target._lpa || target.firstChild;
|
|
3866
3801
|
if (vnode.shapeFlag & 16) {
|
|
3867
|
-
if (
|
|
3802
|
+
if (disabled) {
|
|
3868
3803
|
vnode.anchor = hydrateChildren(
|
|
3869
3804
|
nextSibling(node),
|
|
3870
3805
|
vnode,
|
|
@@ -3905,16 +3840,23 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
3905
3840
|
);
|
|
3906
3841
|
}
|
|
3907
3842
|
}
|
|
3908
|
-
updateCssVars(vnode);
|
|
3843
|
+
updateCssVars(vnode, disabled);
|
|
3909
3844
|
}
|
|
3910
3845
|
return vnode.anchor && nextSibling(vnode.anchor);
|
|
3911
3846
|
}
|
|
3912
3847
|
const Teleport = TeleportImpl;
|
|
3913
|
-
function updateCssVars(vnode) {
|
|
3848
|
+
function updateCssVars(vnode, isDisabled) {
|
|
3914
3849
|
const ctx = vnode.ctx;
|
|
3915
3850
|
if (ctx && ctx.ut) {
|
|
3916
|
-
let node
|
|
3917
|
-
|
|
3851
|
+
let node, anchor;
|
|
3852
|
+
if (isDisabled) {
|
|
3853
|
+
node = vnode.el;
|
|
3854
|
+
anchor = vnode.anchor;
|
|
3855
|
+
} else {
|
|
3856
|
+
node = vnode.targetStart;
|
|
3857
|
+
anchor = vnode.targetAnchor;
|
|
3858
|
+
}
|
|
3859
|
+
while (node && node !== anchor) {
|
|
3918
3860
|
if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid);
|
|
3919
3861
|
node = node.nextSibling;
|
|
3920
3862
|
}
|
|
@@ -4367,8 +4309,15 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4367
4309
|
const setupState = owner.setupState;
|
|
4368
4310
|
const rawSetupState = toRaw(setupState);
|
|
4369
4311
|
const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {
|
|
4370
|
-
|
|
4371
|
-
|
|
4312
|
+
{
|
|
4313
|
+
if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
|
|
4314
|
+
warn$1(
|
|
4315
|
+
`Template ref "${key}" used on a non-ref value. It will not work in the production build.`
|
|
4316
|
+
);
|
|
4317
|
+
}
|
|
4318
|
+
if (knownTemplateRefs.has(rawSetupState[key])) {
|
|
4319
|
+
return false;
|
|
4320
|
+
}
|
|
4372
4321
|
}
|
|
4373
4322
|
return hasOwn(rawSetupState, key);
|
|
4374
4323
|
};
|
|
@@ -4665,7 +4614,11 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4665
4614
|
}
|
|
4666
4615
|
let needCallTransitionHooks = false;
|
|
4667
4616
|
if (isTemplateNode(el)) {
|
|
4668
|
-
needCallTransitionHooks = needTransition(
|
|
4617
|
+
needCallTransitionHooks = needTransition(
|
|
4618
|
+
null,
|
|
4619
|
+
// no need check parentSuspense in hydration
|
|
4620
|
+
transition
|
|
4621
|
+
) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
|
|
4669
4622
|
const content = el.content.firstChild;
|
|
4670
4623
|
if (needCallTransitionHooks) {
|
|
4671
4624
|
transition.beforeEnter(content);
|
|
@@ -5058,6 +5011,8 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
5058
5011
|
}
|
|
5059
5012
|
}
|
|
5060
5013
|
|
|
5014
|
+
const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
|
|
5015
|
+
const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
|
|
5061
5016
|
const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
|
|
5062
5017
|
const id = requestIdleCallback(hydrate, { timeout });
|
|
5063
5018
|
return () => cancelIdleCallback(id);
|
|
@@ -6051,12 +6006,13 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
|
6051
6006
|
}
|
|
6052
6007
|
openBlock();
|
|
6053
6008
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
6009
|
+
const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch
|
|
6010
|
+
// key attached in the `createSlots` helper, respect that
|
|
6011
|
+
validSlotContent && validSlotContent.key;
|
|
6054
6012
|
const rendered = createBlock(
|
|
6055
6013
|
Fragment,
|
|
6056
6014
|
{
|
|
6057
|
-
key: (
|
|
6058
|
-
// key attached in the `createSlots` helper, respect that
|
|
6059
|
-
validSlotContent && validSlotContent.key || `_${name}`) + // #7256 force differentiate fallback content from actual content
|
|
6015
|
+
key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
|
|
6060
6016
|
(!validSlotContent && fallback ? "_fb" : "")
|
|
6061
6017
|
},
|
|
6062
6018
|
validSlotContent || (fallback ? fallback() : []),
|
|
@@ -7225,7 +7181,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7225
7181
|
return vm;
|
|
7226
7182
|
}
|
|
7227
7183
|
}
|
|
7228
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
7184
|
+
Vue.version = `2.6.14-compat:${"3.5.12"}`;
|
|
7229
7185
|
Vue.config = singletonApp.config;
|
|
7230
7186
|
Vue.use = (plugin, ...options) => {
|
|
7231
7187
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -8213,6 +8169,7 @@ function getType(ctor) {
|
|
|
8213
8169
|
function validateProps(rawProps, props, instance) {
|
|
8214
8170
|
const resolvedValues = toRaw(props);
|
|
8215
8171
|
const options = instance.propsOptions[0];
|
|
8172
|
+
const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key));
|
|
8216
8173
|
for (const key in options) {
|
|
8217
8174
|
let opt = options[key];
|
|
8218
8175
|
if (opt == null) continue;
|
|
@@ -8221,7 +8178,7 @@ function validateProps(rawProps, props, instance) {
|
|
|
8221
8178
|
resolvedValues[key],
|
|
8222
8179
|
opt,
|
|
8223
8180
|
shallowReadonly(resolvedValues) ,
|
|
8224
|
-
!
|
|
8181
|
+
!camelizePropsKey.includes(key)
|
|
8225
8182
|
);
|
|
8226
8183
|
}
|
|
8227
8184
|
}
|
|
@@ -10035,14 +9992,13 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
10035
9992
|
}
|
|
10036
9993
|
const baseWatchOptions = extend({}, options);
|
|
10037
9994
|
baseWatchOptions.onWarn = warn$1;
|
|
9995
|
+
const runsImmediately = cb && immediate || !cb && flush !== "post";
|
|
10038
9996
|
let ssrCleanup;
|
|
10039
9997
|
if (isInSSRComponentSetup) {
|
|
10040
9998
|
if (flush === "sync") {
|
|
10041
9999
|
const ctx = useSSRContext();
|
|
10042
10000
|
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
10043
|
-
} else if (!
|
|
10044
|
-
baseWatchOptions.once = true;
|
|
10045
|
-
} else {
|
|
10001
|
+
} else if (!runsImmediately) {
|
|
10046
10002
|
const watchStopHandle = () => {
|
|
10047
10003
|
};
|
|
10048
10004
|
watchStopHandle.stop = NOOP;
|
|
@@ -10081,7 +10037,13 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
10081
10037
|
}
|
|
10082
10038
|
};
|
|
10083
10039
|
const watchHandle = watch$1(source, cb, baseWatchOptions);
|
|
10084
|
-
if (
|
|
10040
|
+
if (isInSSRComponentSetup) {
|
|
10041
|
+
if (ssrCleanup) {
|
|
10042
|
+
ssrCleanup.push(watchHandle);
|
|
10043
|
+
} else if (runsImmediately) {
|
|
10044
|
+
watchHandle();
|
|
10045
|
+
}
|
|
10046
|
+
}
|
|
10085
10047
|
return watchHandle;
|
|
10086
10048
|
}
|
|
10087
10049
|
function instanceWatch(source, value, options) {
|
|
@@ -10116,19 +10078,19 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
10116
10078
|
warn$1(`useModel() called without active instance.`);
|
|
10117
10079
|
return ref();
|
|
10118
10080
|
}
|
|
10119
|
-
|
|
10081
|
+
const camelizedName = camelize(name);
|
|
10082
|
+
if (!i.propsOptions[0][camelizedName]) {
|
|
10120
10083
|
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
|
10121
10084
|
return ref();
|
|
10122
10085
|
}
|
|
10123
|
-
const camelizedName = camelize(name);
|
|
10124
10086
|
const hyphenatedName = hyphenate(name);
|
|
10125
|
-
const modifiers = getModelModifiers(props,
|
|
10087
|
+
const modifiers = getModelModifiers(props, camelizedName);
|
|
10126
10088
|
const res = customRef((track, trigger) => {
|
|
10127
10089
|
let localValue;
|
|
10128
10090
|
let prevSetValue = EMPTY_OBJ;
|
|
10129
10091
|
let prevEmittedValue;
|
|
10130
10092
|
watchSyncEffect(() => {
|
|
10131
|
-
const propValue = props[
|
|
10093
|
+
const propValue = props[camelizedName];
|
|
10132
10094
|
if (hasChanged(localValue, propValue)) {
|
|
10133
10095
|
localValue = propValue;
|
|
10134
10096
|
trigger();
|
|
@@ -11850,9 +11812,9 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
11850
11812
|
}
|
|
11851
11813
|
const { setup } = Component;
|
|
11852
11814
|
if (setup) {
|
|
11815
|
+
pauseTracking();
|
|
11853
11816
|
const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
|
|
11854
11817
|
const reset = setCurrentInstance(instance);
|
|
11855
|
-
pauseTracking();
|
|
11856
11818
|
const setupResult = callWithErrorHandling(
|
|
11857
11819
|
setup,
|
|
11858
11820
|
instance,
|
|
@@ -11862,10 +11824,13 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
11862
11824
|
setupContext
|
|
11863
11825
|
]
|
|
11864
11826
|
);
|
|
11827
|
+
const isAsyncSetup = isPromise(setupResult);
|
|
11865
11828
|
resetTracking();
|
|
11866
11829
|
reset();
|
|
11867
|
-
if (
|
|
11868
|
-
|
|
11830
|
+
if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) {
|
|
11831
|
+
markAsyncBoundary(instance);
|
|
11832
|
+
}
|
|
11833
|
+
if (isAsyncSetup) {
|
|
11869
11834
|
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
11870
11835
|
if (isSSR) {
|
|
11871
11836
|
return setupResult.then((resolvedResult) => {
|
|
@@ -12340,7 +12305,7 @@ function isMemoSame(cached, memo) {
|
|
|
12340
12305
|
return true;
|
|
12341
12306
|
}
|
|
12342
12307
|
|
|
12343
|
-
const version = "3.5.
|
|
12308
|
+
const version = "3.5.12";
|
|
12344
12309
|
const warn = warn$1 ;
|
|
12345
12310
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12346
12311
|
const devtools = devtools$1 ;
|
|
@@ -12979,7 +12944,7 @@ function compatCoerceAttr(el, key, value, instance = null) {
|
|
|
12979
12944
|
return false;
|
|
12980
12945
|
}
|
|
12981
12946
|
|
|
12982
|
-
function patchDOMProp(el, key, value, parentComponent) {
|
|
12947
|
+
function patchDOMProp(el, key, value, parentComponent, attrName) {
|
|
12983
12948
|
if (key === "innerHTML" || key === "textContent") {
|
|
12984
12949
|
if (value != null) {
|
|
12985
12950
|
el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
|
|
@@ -13043,7 +13008,7 @@ function patchDOMProp(el, key, value, parentComponent) {
|
|
|
13043
13008
|
);
|
|
13044
13009
|
}
|
|
13045
13010
|
}
|
|
13046
|
-
needRemove && el.removeAttribute(key);
|
|
13011
|
+
needRemove && el.removeAttribute(attrName || key);
|
|
13047
13012
|
}
|
|
13048
13013
|
|
|
13049
13014
|
function addEventListener(el, event, handler, options) {
|
|
@@ -13153,7 +13118,7 @@ const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) =>
|
|
|
13153
13118
|
// #11081 force set props for possible async custom element
|
|
13154
13119
|
el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))
|
|
13155
13120
|
) {
|
|
13156
|
-
patchDOMProp(el, camelize(key), nextValue, parentComponent);
|
|
13121
|
+
patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
|
|
13157
13122
|
} else {
|
|
13158
13123
|
if (key === "true-value") {
|
|
13159
13124
|
el._trueValue = nextValue;
|
|
@@ -13880,7 +13845,7 @@ const vModelCheckbox = {
|
|
|
13880
13845
|
setChecked(el, binding, vnode);
|
|
13881
13846
|
}
|
|
13882
13847
|
};
|
|
13883
|
-
function setChecked(el, { value }, vnode) {
|
|
13848
|
+
function setChecked(el, { value, oldValue }, vnode) {
|
|
13884
13849
|
el._modelValue = value;
|
|
13885
13850
|
let checked;
|
|
13886
13851
|
if (isArray(value)) {
|
|
@@ -13888,6 +13853,7 @@ function setChecked(el, { value }, vnode) {
|
|
|
13888
13853
|
} else if (isSet(value)) {
|
|
13889
13854
|
checked = value.has(vnode.props.value);
|
|
13890
13855
|
} else {
|
|
13856
|
+
if (value === oldValue) return;
|
|
13891
13857
|
checked = looseEqual(value, getCheckboxValue(el, true));
|
|
13892
13858
|
}
|
|
13893
13859
|
if (el.checked !== checked) {
|
|
@@ -17023,6 +16989,9 @@ function getLoc(start, end) {
|
|
|
17023
16989
|
source: end == null ? end : getSlice(start, end)
|
|
17024
16990
|
};
|
|
17025
16991
|
}
|
|
16992
|
+
function cloneLoc(loc) {
|
|
16993
|
+
return getLoc(loc.start.offset, loc.end.offset);
|
|
16994
|
+
}
|
|
17026
16995
|
function setLocEnd(loc, end) {
|
|
17027
16996
|
loc.end = tokenizer.getPos(end);
|
|
17028
16997
|
loc.source = getSlice(loc.start.offset, end);
|
|
@@ -18785,7 +18754,7 @@ function processIf(node, dir, context, processCodegen) {
|
|
|
18785
18754
|
const branch = createIfBranch(node, dir);
|
|
18786
18755
|
const ifNode = {
|
|
18787
18756
|
type: 9,
|
|
18788
|
-
loc: node.loc,
|
|
18757
|
+
loc: cloneLoc(node.loc),
|
|
18789
18758
|
branches: [branch]
|
|
18790
18759
|
};
|
|
18791
18760
|
context.replaceNode(ifNode);
|
|
@@ -21302,7 +21271,7 @@ function analyzeNode(node) {
|
|
|
21302
21271
|
if (p.exp && (p.exp.type === 8 || p.exp.constType < 3)) {
|
|
21303
21272
|
return bail();
|
|
21304
21273
|
}
|
|
21305
|
-
if (isOptionTag && isStaticArgOf(p.arg, "value") && p.exp && p.exp.
|
|
21274
|
+
if (isOptionTag && isStaticArgOf(p.arg, "value") && p.exp && !p.exp.isStatic) {
|
|
21306
21275
|
return bail();
|
|
21307
21276
|
}
|
|
21308
21277
|
}
|