@vue/compat 3.5.11 → 3.5.13
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 +295 -262
- package/dist/vue.cjs.prod.js +270 -247
- package/dist/vue.esm-browser.js +289 -263
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +290 -264
- package/dist/vue.global.js +280 -259
- package/dist/vue.global.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +270 -254
- package/dist/vue.runtime.esm-browser.prod.js +2 -2
- package/dist/vue.runtime.esm-bundler.js +271 -255
- package/dist/vue.runtime.global.js +261 -250
- 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.13
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -223,10 +223,9 @@ function parseStringStyle(cssText) {
|
|
|
223
223
|
return ret;
|
|
224
224
|
}
|
|
225
225
|
function stringifyStyle(styles) {
|
|
226
|
+
if (!styles) return "";
|
|
227
|
+
if (isString(styles)) return styles;
|
|
226
228
|
let ret = "";
|
|
227
|
-
if (!styles || isString(styles)) {
|
|
228
|
-
return ret;
|
|
229
|
-
}
|
|
230
229
|
for (const key in styles) {
|
|
231
230
|
const value = styles[key];
|
|
232
231
|
if (isString(value) || typeof value === "number") {
|
|
@@ -531,17 +530,21 @@ class EffectScope {
|
|
|
531
530
|
}
|
|
532
531
|
stop(fromParent) {
|
|
533
532
|
if (this._active) {
|
|
533
|
+
this._active = false;
|
|
534
534
|
let i, l;
|
|
535
535
|
for (i = 0, l = this.effects.length; i < l; i++) {
|
|
536
536
|
this.effects[i].stop();
|
|
537
537
|
}
|
|
538
|
+
this.effects.length = 0;
|
|
538
539
|
for (i = 0, l = this.cleanups.length; i < l; i++) {
|
|
539
540
|
this.cleanups[i]();
|
|
540
541
|
}
|
|
542
|
+
this.cleanups.length = 0;
|
|
541
543
|
if (this.scopes) {
|
|
542
544
|
for (i = 0, l = this.scopes.length; i < l; i++) {
|
|
543
545
|
this.scopes[i].stop(true);
|
|
544
546
|
}
|
|
547
|
+
this.scopes.length = 0;
|
|
545
548
|
}
|
|
546
549
|
if (!this.detached && this.parent && !fromParent) {
|
|
547
550
|
const last = this.parent.scopes.pop();
|
|
@@ -551,7 +554,6 @@ class EffectScope {
|
|
|
551
554
|
}
|
|
552
555
|
}
|
|
553
556
|
this.parent = void 0;
|
|
554
|
-
this._active = false;
|
|
555
557
|
}
|
|
556
558
|
}
|
|
557
559
|
}
|
|
@@ -816,16 +818,16 @@ function removeSub(link, soft = false) {
|
|
|
816
818
|
nextSub.prevSub = prevSub;
|
|
817
819
|
link.nextSub = void 0;
|
|
818
820
|
}
|
|
819
|
-
if (dep.subs === link) {
|
|
820
|
-
dep.subs = prevSub;
|
|
821
|
-
}
|
|
822
821
|
if (dep.subsHead === link) {
|
|
823
822
|
dep.subsHead = nextSub;
|
|
824
823
|
}
|
|
825
|
-
if (
|
|
826
|
-
dep.
|
|
827
|
-
|
|
828
|
-
|
|
824
|
+
if (dep.subs === link) {
|
|
825
|
+
dep.subs = prevSub;
|
|
826
|
+
if (!prevSub && dep.computed) {
|
|
827
|
+
dep.computed.flags &= ~4;
|
|
828
|
+
for (let l = dep.computed.deps; l; l = l.nextDep) {
|
|
829
|
+
removeSub(l, true);
|
|
830
|
+
}
|
|
829
831
|
}
|
|
830
832
|
}
|
|
831
833
|
if (!soft && !--dep.sc && dep.map) {
|
|
@@ -1085,7 +1087,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
1085
1087
|
}
|
|
1086
1088
|
});
|
|
1087
1089
|
} else {
|
|
1088
|
-
if (key !== void 0) {
|
|
1090
|
+
if (key !== void 0 || depsMap.has(void 0)) {
|
|
1089
1091
|
run(depsMap.get(key));
|
|
1090
1092
|
}
|
|
1091
1093
|
if (isArrayIndex) {
|
|
@@ -1317,6 +1319,7 @@ class BaseReactiveHandler {
|
|
|
1317
1319
|
this._isShallow = _isShallow;
|
|
1318
1320
|
}
|
|
1319
1321
|
get(target, key, receiver) {
|
|
1322
|
+
if (key === "__v_skip") return target["__v_skip"];
|
|
1320
1323
|
const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
|
|
1321
1324
|
if (key === "__v_isReactive") {
|
|
1322
1325
|
return !isReadonly2;
|
|
@@ -1460,117 +1463,6 @@ const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true
|
|
|
1460
1463
|
|
|
1461
1464
|
const toShallow = (value) => value;
|
|
1462
1465
|
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
1466
|
function createIterableMethod(method, isReadonly2, isShallow2) {
|
|
1575
1467
|
return function(...args) {
|
|
1576
1468
|
const target = this["__v_raw"];
|
|
@@ -1613,71 +1505,134 @@ function createReadonlyMethod(type) {
|
|
|
1613
1505
|
return type === "delete" ? false : type === "clear" ? void 0 : this;
|
|
1614
1506
|
};
|
|
1615
1507
|
}
|
|
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 = {
|
|
1508
|
+
function createInstrumentations(readonly, shallow) {
|
|
1509
|
+
const instrumentations = {
|
|
1632
1510
|
get(key) {
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
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 = {
|
|
1666
|
-
get(key) {
|
|
1667
|
-
return get(this, key, true, true);
|
|
1511
|
+
const target = this["__v_raw"];
|
|
1512
|
+
const rawTarget = toRaw(target);
|
|
1513
|
+
const rawKey = toRaw(key);
|
|
1514
|
+
if (!readonly) {
|
|
1515
|
+
if (hasChanged(key, rawKey)) {
|
|
1516
|
+
track(rawTarget, "get", key);
|
|
1517
|
+
}
|
|
1518
|
+
track(rawTarget, "get", rawKey);
|
|
1519
|
+
}
|
|
1520
|
+
const { has } = getProto(rawTarget);
|
|
1521
|
+
const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
|
|
1522
|
+
if (has.call(rawTarget, key)) {
|
|
1523
|
+
return wrap(target.get(key));
|
|
1524
|
+
} else if (has.call(rawTarget, rawKey)) {
|
|
1525
|
+
return wrap(target.get(rawKey));
|
|
1526
|
+
} else if (target !== rawTarget) {
|
|
1527
|
+
target.get(key);
|
|
1528
|
+
}
|
|
1668
1529
|
},
|
|
1669
1530
|
get size() {
|
|
1670
|
-
|
|
1531
|
+
const target = this["__v_raw"];
|
|
1532
|
+
!readonly && track(toRaw(target), "iterate", ITERATE_KEY);
|
|
1533
|
+
return Reflect.get(target, "size", target);
|
|
1671
1534
|
},
|
|
1672
1535
|
has(key) {
|
|
1673
|
-
|
|
1536
|
+
const target = this["__v_raw"];
|
|
1537
|
+
const rawTarget = toRaw(target);
|
|
1538
|
+
const rawKey = toRaw(key);
|
|
1539
|
+
if (!readonly) {
|
|
1540
|
+
if (hasChanged(key, rawKey)) {
|
|
1541
|
+
track(rawTarget, "has", key);
|
|
1542
|
+
}
|
|
1543
|
+
track(rawTarget, "has", rawKey);
|
|
1544
|
+
}
|
|
1545
|
+
return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
|
|
1674
1546
|
},
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1547
|
+
forEach(callback, thisArg) {
|
|
1548
|
+
const observed = this;
|
|
1549
|
+
const target = observed["__v_raw"];
|
|
1550
|
+
const rawTarget = toRaw(target);
|
|
1551
|
+
const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
|
|
1552
|
+
!readonly && track(rawTarget, "iterate", ITERATE_KEY);
|
|
1553
|
+
return target.forEach((value, key) => {
|
|
1554
|
+
return callback.call(thisArg, wrap(value), wrap(key), observed);
|
|
1555
|
+
});
|
|
1556
|
+
}
|
|
1680
1557
|
};
|
|
1558
|
+
extend(
|
|
1559
|
+
instrumentations,
|
|
1560
|
+
readonly ? {
|
|
1561
|
+
add: createReadonlyMethod("add"),
|
|
1562
|
+
set: createReadonlyMethod("set"),
|
|
1563
|
+
delete: createReadonlyMethod("delete"),
|
|
1564
|
+
clear: createReadonlyMethod("clear")
|
|
1565
|
+
} : {
|
|
1566
|
+
add(value) {
|
|
1567
|
+
if (!shallow && !isShallow(value) && !isReadonly(value)) {
|
|
1568
|
+
value = toRaw(value);
|
|
1569
|
+
}
|
|
1570
|
+
const target = toRaw(this);
|
|
1571
|
+
const proto = getProto(target);
|
|
1572
|
+
const hadKey = proto.has.call(target, value);
|
|
1573
|
+
if (!hadKey) {
|
|
1574
|
+
target.add(value);
|
|
1575
|
+
trigger(target, "add", value, value);
|
|
1576
|
+
}
|
|
1577
|
+
return this;
|
|
1578
|
+
},
|
|
1579
|
+
set(key, value) {
|
|
1580
|
+
if (!shallow && !isShallow(value) && !isReadonly(value)) {
|
|
1581
|
+
value = toRaw(value);
|
|
1582
|
+
}
|
|
1583
|
+
const target = toRaw(this);
|
|
1584
|
+
const { has, get } = getProto(target);
|
|
1585
|
+
let hadKey = has.call(target, key);
|
|
1586
|
+
if (!hadKey) {
|
|
1587
|
+
key = toRaw(key);
|
|
1588
|
+
hadKey = has.call(target, key);
|
|
1589
|
+
} else {
|
|
1590
|
+
checkIdentityKeys(target, has, key);
|
|
1591
|
+
}
|
|
1592
|
+
const oldValue = get.call(target, key);
|
|
1593
|
+
target.set(key, value);
|
|
1594
|
+
if (!hadKey) {
|
|
1595
|
+
trigger(target, "add", key, value);
|
|
1596
|
+
} else if (hasChanged(value, oldValue)) {
|
|
1597
|
+
trigger(target, "set", key, value, oldValue);
|
|
1598
|
+
}
|
|
1599
|
+
return this;
|
|
1600
|
+
},
|
|
1601
|
+
delete(key) {
|
|
1602
|
+
const target = toRaw(this);
|
|
1603
|
+
const { has, get } = getProto(target);
|
|
1604
|
+
let hadKey = has.call(target, key);
|
|
1605
|
+
if (!hadKey) {
|
|
1606
|
+
key = toRaw(key);
|
|
1607
|
+
hadKey = has.call(target, key);
|
|
1608
|
+
} else {
|
|
1609
|
+
checkIdentityKeys(target, has, key);
|
|
1610
|
+
}
|
|
1611
|
+
const oldValue = get ? get.call(target, key) : void 0;
|
|
1612
|
+
const result = target.delete(key);
|
|
1613
|
+
if (hadKey) {
|
|
1614
|
+
trigger(target, "delete", key, void 0, oldValue);
|
|
1615
|
+
}
|
|
1616
|
+
return result;
|
|
1617
|
+
},
|
|
1618
|
+
clear() {
|
|
1619
|
+
const target = toRaw(this);
|
|
1620
|
+
const hadItems = target.size !== 0;
|
|
1621
|
+
const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
|
|
1622
|
+
const result = target.clear();
|
|
1623
|
+
if (hadItems) {
|
|
1624
|
+
trigger(
|
|
1625
|
+
target,
|
|
1626
|
+
"clear",
|
|
1627
|
+
void 0,
|
|
1628
|
+
void 0,
|
|
1629
|
+
oldTarget
|
|
1630
|
+
);
|
|
1631
|
+
}
|
|
1632
|
+
return result;
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
);
|
|
1681
1636
|
const iteratorMethods = [
|
|
1682
1637
|
"keys",
|
|
1683
1638
|
"values",
|
|
@@ -1685,30 +1640,12 @@ function createInstrumentations() {
|
|
|
1685
1640
|
Symbol.iterator
|
|
1686
1641
|
];
|
|
1687
1642
|
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
|
-
);
|
|
1643
|
+
instrumentations[method] = createIterableMethod(method, readonly, shallow);
|
|
1696
1644
|
});
|
|
1697
|
-
return
|
|
1698
|
-
mutableInstrumentations2,
|
|
1699
|
-
readonlyInstrumentations2,
|
|
1700
|
-
shallowInstrumentations2,
|
|
1701
|
-
shallowReadonlyInstrumentations2
|
|
1702
|
-
];
|
|
1645
|
+
return instrumentations;
|
|
1703
1646
|
}
|
|
1704
|
-
const [
|
|
1705
|
-
mutableInstrumentations,
|
|
1706
|
-
readonlyInstrumentations,
|
|
1707
|
-
shallowInstrumentations,
|
|
1708
|
-
shallowReadonlyInstrumentations
|
|
1709
|
-
] = /* @__PURE__ */ createInstrumentations();
|
|
1710
1647
|
function createInstrumentationGetter(isReadonly2, shallow) {
|
|
1711
|
-
const instrumentations =
|
|
1648
|
+
const instrumentations = createInstrumentations(isReadonly2, shallow);
|
|
1712
1649
|
return (target, key, receiver) => {
|
|
1713
1650
|
if (key === "__v_isReactive") {
|
|
1714
1651
|
return !isReadonly2;
|
|
@@ -1736,9 +1673,9 @@ const readonlyCollectionHandlers = {
|
|
|
1736
1673
|
const shallowReadonlyCollectionHandlers = {
|
|
1737
1674
|
get: /* @__PURE__ */ createInstrumentationGetter(true, true)
|
|
1738
1675
|
};
|
|
1739
|
-
function checkIdentityKeys(target,
|
|
1676
|
+
function checkIdentityKeys(target, has, key) {
|
|
1740
1677
|
const rawKey = toRaw(key);
|
|
1741
|
-
if (rawKey !== key &&
|
|
1678
|
+
if (rawKey !== key && has.call(target, rawKey)) {
|
|
1742
1679
|
const type = toRawType(target);
|
|
1743
1680
|
warn$2(
|
|
1744
1681
|
`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.`
|
|
@@ -2219,7 +2156,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2219
2156
|
const scope = getCurrentScope();
|
|
2220
2157
|
const watchHandle = () => {
|
|
2221
2158
|
effect.stop();
|
|
2222
|
-
if (scope) {
|
|
2159
|
+
if (scope && scope.active) {
|
|
2223
2160
|
remove(scope.effects, effect);
|
|
2224
2161
|
}
|
|
2225
2162
|
};
|
|
@@ -3692,7 +3629,7 @@ const TeleportImpl = {
|
|
|
3692
3629
|
}
|
|
3693
3630
|
if (!disabled) {
|
|
3694
3631
|
mount(target, targetAnchor);
|
|
3695
|
-
updateCssVars(n2);
|
|
3632
|
+
updateCssVars(n2, false);
|
|
3696
3633
|
}
|
|
3697
3634
|
} else if (!disabled) {
|
|
3698
3635
|
warn$1(
|
|
@@ -3704,14 +3641,35 @@ const TeleportImpl = {
|
|
|
3704
3641
|
};
|
|
3705
3642
|
if (disabled) {
|
|
3706
3643
|
mount(container, mainAnchor);
|
|
3707
|
-
updateCssVars(n2);
|
|
3644
|
+
updateCssVars(n2, true);
|
|
3708
3645
|
}
|
|
3709
3646
|
if (isTeleportDeferred(n2.props)) {
|
|
3710
|
-
queuePostRenderEffect(
|
|
3647
|
+
queuePostRenderEffect(() => {
|
|
3648
|
+
mountToTarget();
|
|
3649
|
+
n2.el.__isMounted = true;
|
|
3650
|
+
}, parentSuspense);
|
|
3711
3651
|
} else {
|
|
3712
3652
|
mountToTarget();
|
|
3713
3653
|
}
|
|
3714
3654
|
} else {
|
|
3655
|
+
if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) {
|
|
3656
|
+
queuePostRenderEffect(() => {
|
|
3657
|
+
TeleportImpl.process(
|
|
3658
|
+
n1,
|
|
3659
|
+
n2,
|
|
3660
|
+
container,
|
|
3661
|
+
anchor,
|
|
3662
|
+
parentComponent,
|
|
3663
|
+
parentSuspense,
|
|
3664
|
+
namespace,
|
|
3665
|
+
slotScopeIds,
|
|
3666
|
+
optimized,
|
|
3667
|
+
internals
|
|
3668
|
+
);
|
|
3669
|
+
delete n1.el.__isMounted;
|
|
3670
|
+
}, parentSuspense);
|
|
3671
|
+
return;
|
|
3672
|
+
}
|
|
3715
3673
|
n2.el = n1.el;
|
|
3716
3674
|
n2.targetStart = n1.targetStart;
|
|
3717
3675
|
const mainAnchor = n2.anchor = n1.anchor;
|
|
@@ -3794,7 +3752,7 @@ const TeleportImpl = {
|
|
|
3794
3752
|
);
|
|
3795
3753
|
}
|
|
3796
3754
|
}
|
|
3797
|
-
updateCssVars(n2);
|
|
3755
|
+
updateCssVars(n2, disabled);
|
|
3798
3756
|
}
|
|
3799
3757
|
},
|
|
3800
3758
|
remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
@@ -3862,9 +3820,10 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
3862
3820
|
querySelector
|
|
3863
3821
|
);
|
|
3864
3822
|
if (target) {
|
|
3823
|
+
const disabled = isTeleportDisabled(vnode.props);
|
|
3865
3824
|
const targetNode = target._lpa || target.firstChild;
|
|
3866
3825
|
if (vnode.shapeFlag & 16) {
|
|
3867
|
-
if (
|
|
3826
|
+
if (disabled) {
|
|
3868
3827
|
vnode.anchor = hydrateChildren(
|
|
3869
3828
|
nextSibling(node),
|
|
3870
3829
|
vnode,
|
|
@@ -3905,16 +3864,23 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
3905
3864
|
);
|
|
3906
3865
|
}
|
|
3907
3866
|
}
|
|
3908
|
-
updateCssVars(vnode);
|
|
3867
|
+
updateCssVars(vnode, disabled);
|
|
3909
3868
|
}
|
|
3910
3869
|
return vnode.anchor && nextSibling(vnode.anchor);
|
|
3911
3870
|
}
|
|
3912
3871
|
const Teleport = TeleportImpl;
|
|
3913
|
-
function updateCssVars(vnode) {
|
|
3872
|
+
function updateCssVars(vnode, isDisabled) {
|
|
3914
3873
|
const ctx = vnode.ctx;
|
|
3915
3874
|
if (ctx && ctx.ut) {
|
|
3916
|
-
let node
|
|
3917
|
-
|
|
3875
|
+
let node, anchor;
|
|
3876
|
+
if (isDisabled) {
|
|
3877
|
+
node = vnode.el;
|
|
3878
|
+
anchor = vnode.anchor;
|
|
3879
|
+
} else {
|
|
3880
|
+
node = vnode.targetStart;
|
|
3881
|
+
anchor = vnode.targetAnchor;
|
|
3882
|
+
}
|
|
3883
|
+
while (node && node !== anchor) {
|
|
3918
3884
|
if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid);
|
|
3919
3885
|
node = node.nextSibling;
|
|
3920
3886
|
}
|
|
@@ -4009,10 +3975,9 @@ const BaseTransitionImpl = {
|
|
|
4009
3975
|
if (innerChild.type !== Comment) {
|
|
4010
3976
|
setTransitionHooks(innerChild, enterHooks);
|
|
4011
3977
|
}
|
|
4012
|
-
|
|
4013
|
-
const oldInnerChild = oldChild && getInnerChild$1(oldChild);
|
|
3978
|
+
let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
|
|
4014
3979
|
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
|
|
4015
|
-
|
|
3980
|
+
let leavingHooks = resolveTransitionHooks(
|
|
4016
3981
|
oldInnerChild,
|
|
4017
3982
|
rawProps,
|
|
4018
3983
|
state,
|
|
@@ -4027,6 +3992,7 @@ const BaseTransitionImpl = {
|
|
|
4027
3992
|
instance.update();
|
|
4028
3993
|
}
|
|
4029
3994
|
delete leavingHooks.afterLeave;
|
|
3995
|
+
oldInnerChild = void 0;
|
|
4030
3996
|
};
|
|
4031
3997
|
return emptyPlaceholder(child);
|
|
4032
3998
|
} else if (mode === "in-out" && innerChild.type !== Comment) {
|
|
@@ -4040,10 +4006,19 @@ const BaseTransitionImpl = {
|
|
|
4040
4006
|
earlyRemove();
|
|
4041
4007
|
el[leaveCbKey] = void 0;
|
|
4042
4008
|
delete enterHooks.delayedLeave;
|
|
4009
|
+
oldInnerChild = void 0;
|
|
4010
|
+
};
|
|
4011
|
+
enterHooks.delayedLeave = () => {
|
|
4012
|
+
delayedLeave();
|
|
4013
|
+
delete enterHooks.delayedLeave;
|
|
4014
|
+
oldInnerChild = void 0;
|
|
4043
4015
|
};
|
|
4044
|
-
enterHooks.delayedLeave = delayedLeave;
|
|
4045
4016
|
};
|
|
4017
|
+
} else {
|
|
4018
|
+
oldInnerChild = void 0;
|
|
4046
4019
|
}
|
|
4020
|
+
} else if (oldInnerChild) {
|
|
4021
|
+
oldInnerChild = void 0;
|
|
4047
4022
|
}
|
|
4048
4023
|
return child;
|
|
4049
4024
|
};
|
|
@@ -4351,6 +4326,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4351
4326
|
return;
|
|
4352
4327
|
}
|
|
4353
4328
|
if (isAsyncWrapper(vnode) && !isUnmount) {
|
|
4329
|
+
if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) {
|
|
4330
|
+
setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree);
|
|
4331
|
+
}
|
|
4354
4332
|
return;
|
|
4355
4333
|
}
|
|
4356
4334
|
const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
|
|
@@ -4367,8 +4345,15 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4367
4345
|
const setupState = owner.setupState;
|
|
4368
4346
|
const rawSetupState = toRaw(setupState);
|
|
4369
4347
|
const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {
|
|
4370
|
-
|
|
4371
|
-
|
|
4348
|
+
{
|
|
4349
|
+
if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
|
|
4350
|
+
warn$1(
|
|
4351
|
+
`Template ref "${key}" used on a non-ref value. It will not work in the production build.`
|
|
4352
|
+
);
|
|
4353
|
+
}
|
|
4354
|
+
if (knownTemplateRefs.has(rawSetupState[key])) {
|
|
4355
|
+
return false;
|
|
4356
|
+
}
|
|
4372
4357
|
}
|
|
4373
4358
|
return hasOwn(rawSetupState, key);
|
|
4374
4359
|
};
|
|
@@ -4608,7 +4593,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4608
4593
|
getContainerType(container),
|
|
4609
4594
|
optimized
|
|
4610
4595
|
);
|
|
4611
|
-
if (isAsyncWrapper(vnode)) {
|
|
4596
|
+
if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
|
|
4612
4597
|
let subTree;
|
|
4613
4598
|
if (isFragmentStart) {
|
|
4614
4599
|
subTree = createVNode(Fragment);
|
|
@@ -4665,7 +4650,11 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4665
4650
|
}
|
|
4666
4651
|
let needCallTransitionHooks = false;
|
|
4667
4652
|
if (isTemplateNode(el)) {
|
|
4668
|
-
needCallTransitionHooks = needTransition(
|
|
4653
|
+
needCallTransitionHooks = needTransition(
|
|
4654
|
+
null,
|
|
4655
|
+
// no need check parentSuspense in hydration
|
|
4656
|
+
transition
|
|
4657
|
+
) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
|
|
4669
4658
|
const content = el.content.firstChild;
|
|
4670
4659
|
if (needCallTransitionHooks) {
|
|
4671
4660
|
transition.beforeEnter(content);
|
|
@@ -4873,6 +4862,10 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4873
4862
|
getContainerType(container),
|
|
4874
4863
|
slotScopeIds
|
|
4875
4864
|
);
|
|
4865
|
+
if (parentComponent) {
|
|
4866
|
+
parentComponent.vnode.el = vnode.el;
|
|
4867
|
+
updateHOCHostEl(parentComponent, vnode.el);
|
|
4868
|
+
}
|
|
4876
4869
|
return next;
|
|
4877
4870
|
};
|
|
4878
4871
|
const locateClosingAnchor = (node, open = "[", close = "]") => {
|
|
@@ -5058,6 +5051,8 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
5058
5051
|
}
|
|
5059
5052
|
}
|
|
5060
5053
|
|
|
5054
|
+
const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
|
|
5055
|
+
const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
|
|
5061
5056
|
const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
|
|
5062
5057
|
const id = requestIdleCallback(hydrate, { timeout });
|
|
5063
5058
|
return () => cancelIdleCallback(id);
|
|
@@ -6051,12 +6046,13 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
|
6051
6046
|
}
|
|
6052
6047
|
openBlock();
|
|
6053
6048
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
6049
|
+
const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch
|
|
6050
|
+
// key attached in the `createSlots` helper, respect that
|
|
6051
|
+
validSlotContent && validSlotContent.key;
|
|
6054
6052
|
const rendered = createBlock(
|
|
6055
6053
|
Fragment,
|
|
6056
6054
|
{
|
|
6057
|
-
key: (
|
|
6058
|
-
// key attached in the `createSlots` helper, respect that
|
|
6059
|
-
validSlotContent && validSlotContent.key || `_${name}`) + // #7256 force differentiate fallback content from actual content
|
|
6055
|
+
key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
|
|
6060
6056
|
(!validSlotContent && fallback ? "_fb" : "")
|
|
6061
6057
|
},
|
|
6062
6058
|
validSlotContent || (fallback ? fallback() : []),
|
|
@@ -7225,7 +7221,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7225
7221
|
return vm;
|
|
7226
7222
|
}
|
|
7227
7223
|
}
|
|
7228
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
7224
|
+
Vue.version = `2.6.14-compat:${"3.5.13"}`;
|
|
7229
7225
|
Vue.config = singletonApp.config;
|
|
7230
7226
|
Vue.use = (plugin, ...options) => {
|
|
7231
7227
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -8213,6 +8209,7 @@ function getType(ctor) {
|
|
|
8213
8209
|
function validateProps(rawProps, props, instance) {
|
|
8214
8210
|
const resolvedValues = toRaw(props);
|
|
8215
8211
|
const options = instance.propsOptions[0];
|
|
8212
|
+
const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key));
|
|
8216
8213
|
for (const key in options) {
|
|
8217
8214
|
let opt = options[key];
|
|
8218
8215
|
if (opt == null) continue;
|
|
@@ -8221,7 +8218,7 @@ function validateProps(rawProps, props, instance) {
|
|
|
8221
8218
|
resolvedValues[key],
|
|
8222
8219
|
opt,
|
|
8223
8220
|
shallowReadonly(resolvedValues) ,
|
|
8224
|
-
!
|
|
8221
|
+
!camelizePropsKey.includes(key)
|
|
8225
8222
|
);
|
|
8226
8223
|
}
|
|
8227
8224
|
}
|
|
@@ -10035,14 +10032,13 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
10035
10032
|
}
|
|
10036
10033
|
const baseWatchOptions = extend({}, options);
|
|
10037
10034
|
baseWatchOptions.onWarn = warn$1;
|
|
10035
|
+
const runsImmediately = cb && immediate || !cb && flush !== "post";
|
|
10038
10036
|
let ssrCleanup;
|
|
10039
10037
|
if (isInSSRComponentSetup) {
|
|
10040
10038
|
if (flush === "sync") {
|
|
10041
10039
|
const ctx = useSSRContext();
|
|
10042
10040
|
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
10043
|
-
} else if (!
|
|
10044
|
-
baseWatchOptions.once = true;
|
|
10045
|
-
} else {
|
|
10041
|
+
} else if (!runsImmediately) {
|
|
10046
10042
|
const watchStopHandle = () => {
|
|
10047
10043
|
};
|
|
10048
10044
|
watchStopHandle.stop = NOOP;
|
|
@@ -10081,7 +10077,13 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
10081
10077
|
}
|
|
10082
10078
|
};
|
|
10083
10079
|
const watchHandle = watch$1(source, cb, baseWatchOptions);
|
|
10084
|
-
if (
|
|
10080
|
+
if (isInSSRComponentSetup) {
|
|
10081
|
+
if (ssrCleanup) {
|
|
10082
|
+
ssrCleanup.push(watchHandle);
|
|
10083
|
+
} else if (runsImmediately) {
|
|
10084
|
+
watchHandle();
|
|
10085
|
+
}
|
|
10086
|
+
}
|
|
10085
10087
|
return watchHandle;
|
|
10086
10088
|
}
|
|
10087
10089
|
function instanceWatch(source, value, options) {
|
|
@@ -10116,19 +10118,19 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
10116
10118
|
warn$1(`useModel() called without active instance.`);
|
|
10117
10119
|
return ref();
|
|
10118
10120
|
}
|
|
10119
|
-
|
|
10121
|
+
const camelizedName = camelize(name);
|
|
10122
|
+
if (!i.propsOptions[0][camelizedName]) {
|
|
10120
10123
|
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
|
10121
10124
|
return ref();
|
|
10122
10125
|
}
|
|
10123
|
-
const camelizedName = camelize(name);
|
|
10124
10126
|
const hyphenatedName = hyphenate(name);
|
|
10125
|
-
const modifiers = getModelModifiers(props,
|
|
10127
|
+
const modifiers = getModelModifiers(props, camelizedName);
|
|
10126
10128
|
const res = customRef((track, trigger) => {
|
|
10127
10129
|
let localValue;
|
|
10128
10130
|
let prevSetValue = EMPTY_OBJ;
|
|
10129
10131
|
let prevEmittedValue;
|
|
10130
10132
|
watchSyncEffect(() => {
|
|
10131
|
-
const propValue = props[
|
|
10133
|
+
const propValue = props[camelizedName];
|
|
10132
10134
|
if (hasChanged(localValue, propValue)) {
|
|
10133
10135
|
localValue = propValue;
|
|
10134
10136
|
trigger();
|
|
@@ -10434,7 +10436,7 @@ function renderComponentRoot(instance) {
|
|
|
10434
10436
|
}
|
|
10435
10437
|
if (extraAttrs.length) {
|
|
10436
10438
|
warn$1(
|
|
10437
|
-
`Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
|
|
10439
|
+
`Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`
|
|
10438
10440
|
);
|
|
10439
10441
|
}
|
|
10440
10442
|
if (eventAttrs.length) {
|
|
@@ -11295,9 +11297,9 @@ function closeBlock() {
|
|
|
11295
11297
|
currentBlock = blockStack[blockStack.length - 1] || null;
|
|
11296
11298
|
}
|
|
11297
11299
|
let isBlockTreeEnabled = 1;
|
|
11298
|
-
function setBlockTracking(value) {
|
|
11300
|
+
function setBlockTracking(value, inVOnce = false) {
|
|
11299
11301
|
isBlockTreeEnabled += value;
|
|
11300
|
-
if (value < 0 && currentBlock) {
|
|
11302
|
+
if (value < 0 && currentBlock && inVOnce) {
|
|
11301
11303
|
currentBlock.hasOnce = true;
|
|
11302
11304
|
}
|
|
11303
11305
|
}
|
|
@@ -11850,9 +11852,9 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
11850
11852
|
}
|
|
11851
11853
|
const { setup } = Component;
|
|
11852
11854
|
if (setup) {
|
|
11855
|
+
pauseTracking();
|
|
11853
11856
|
const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
|
|
11854
11857
|
const reset = setCurrentInstance(instance);
|
|
11855
|
-
pauseTracking();
|
|
11856
11858
|
const setupResult = callWithErrorHandling(
|
|
11857
11859
|
setup,
|
|
11858
11860
|
instance,
|
|
@@ -11862,10 +11864,13 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
11862
11864
|
setupContext
|
|
11863
11865
|
]
|
|
11864
11866
|
);
|
|
11867
|
+
const isAsyncSetup = isPromise(setupResult);
|
|
11865
11868
|
resetTracking();
|
|
11866
11869
|
reset();
|
|
11867
|
-
if (
|
|
11868
|
-
|
|
11870
|
+
if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) {
|
|
11871
|
+
markAsyncBoundary(instance);
|
|
11872
|
+
}
|
|
11873
|
+
if (isAsyncSetup) {
|
|
11869
11874
|
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
11870
11875
|
if (isSSR) {
|
|
11871
11876
|
return setupResult.then((resolvedResult) => {
|
|
@@ -12340,7 +12345,7 @@ function isMemoSame(cached, memo) {
|
|
|
12340
12345
|
return true;
|
|
12341
12346
|
}
|
|
12342
12347
|
|
|
12343
|
-
const version = "3.5.
|
|
12348
|
+
const version = "3.5.13";
|
|
12344
12349
|
const warn = warn$1 ;
|
|
12345
12350
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12346
12351
|
const devtools = devtools$1 ;
|
|
@@ -12550,7 +12555,8 @@ function resolveTransitionProps(rawProps) {
|
|
|
12550
12555
|
onAppear = onEnter,
|
|
12551
12556
|
onAppearCancelled = onEnterCancelled
|
|
12552
12557
|
} = baseProps;
|
|
12553
|
-
const finishEnter = (el, isAppear, done) => {
|
|
12558
|
+
const finishEnter = (el, isAppear, done, isCancelled) => {
|
|
12559
|
+
el._enterCancelled = isCancelled;
|
|
12554
12560
|
removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
12555
12561
|
removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
|
|
12556
12562
|
done && done();
|
|
@@ -12608,8 +12614,13 @@ function resolveTransitionProps(rawProps) {
|
|
|
12608
12614
|
if (legacyClassEnabled && legacyLeaveFromClass) {
|
|
12609
12615
|
addTransitionClass(el, legacyLeaveFromClass);
|
|
12610
12616
|
}
|
|
12611
|
-
|
|
12612
|
-
|
|
12617
|
+
if (!el._enterCancelled) {
|
|
12618
|
+
forceReflow();
|
|
12619
|
+
addTransitionClass(el, leaveActiveClass);
|
|
12620
|
+
} else {
|
|
12621
|
+
addTransitionClass(el, leaveActiveClass);
|
|
12622
|
+
forceReflow();
|
|
12623
|
+
}
|
|
12613
12624
|
nextFrame(() => {
|
|
12614
12625
|
if (!el._isLeaving) {
|
|
12615
12626
|
return;
|
|
@@ -12626,11 +12637,11 @@ function resolveTransitionProps(rawProps) {
|
|
|
12626
12637
|
callHook(onLeave, [el, resolve]);
|
|
12627
12638
|
},
|
|
12628
12639
|
onEnterCancelled(el) {
|
|
12629
|
-
finishEnter(el, false);
|
|
12640
|
+
finishEnter(el, false, void 0, true);
|
|
12630
12641
|
callHook(onEnterCancelled, [el]);
|
|
12631
12642
|
},
|
|
12632
12643
|
onAppearCancelled(el) {
|
|
12633
|
-
finishEnter(el, true);
|
|
12644
|
+
finishEnter(el, true, void 0, true);
|
|
12634
12645
|
callHook(onAppearCancelled, [el]);
|
|
12635
12646
|
},
|
|
12636
12647
|
onLeaveCancelled(el) {
|
|
@@ -12979,7 +12990,7 @@ function compatCoerceAttr(el, key, value, instance = null) {
|
|
|
12979
12990
|
return false;
|
|
12980
12991
|
}
|
|
12981
12992
|
|
|
12982
|
-
function patchDOMProp(el, key, value, parentComponent) {
|
|
12993
|
+
function patchDOMProp(el, key, value, parentComponent, attrName) {
|
|
12983
12994
|
if (key === "innerHTML" || key === "textContent") {
|
|
12984
12995
|
if (value != null) {
|
|
12985
12996
|
el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
|
|
@@ -13043,7 +13054,7 @@ function patchDOMProp(el, key, value, parentComponent) {
|
|
|
13043
13054
|
);
|
|
13044
13055
|
}
|
|
13045
13056
|
}
|
|
13046
|
-
needRemove && el.removeAttribute(key);
|
|
13057
|
+
needRemove && el.removeAttribute(attrName || key);
|
|
13047
13058
|
}
|
|
13048
13059
|
|
|
13049
13060
|
function addEventListener(el, event, handler, options) {
|
|
@@ -13153,7 +13164,7 @@ const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) =>
|
|
|
13153
13164
|
// #11081 force set props for possible async custom element
|
|
13154
13165
|
el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))
|
|
13155
13166
|
) {
|
|
13156
|
-
patchDOMProp(el, camelize(key), nextValue, parentComponent);
|
|
13167
|
+
patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
|
|
13157
13168
|
} else {
|
|
13158
13169
|
if (key === "true-value") {
|
|
13159
13170
|
el._trueValue = nextValue;
|
|
@@ -13438,6 +13449,8 @@ class VueElement extends BaseClass {
|
|
|
13438
13449
|
this._update();
|
|
13439
13450
|
}
|
|
13440
13451
|
if (shouldReflect) {
|
|
13452
|
+
const ob = this._ob;
|
|
13453
|
+
ob && ob.disconnect();
|
|
13441
13454
|
if (val === true) {
|
|
13442
13455
|
this.setAttribute(hyphenate(key), "");
|
|
13443
13456
|
} else if (typeof val === "string" || typeof val === "number") {
|
|
@@ -13445,6 +13458,7 @@ class VueElement extends BaseClass {
|
|
|
13445
13458
|
} else if (!val) {
|
|
13446
13459
|
this.removeAttribute(hyphenate(key));
|
|
13447
13460
|
}
|
|
13461
|
+
ob && ob.observe(this, { attributes: true });
|
|
13448
13462
|
}
|
|
13449
13463
|
}
|
|
13450
13464
|
}
|
|
@@ -13880,7 +13894,7 @@ const vModelCheckbox = {
|
|
|
13880
13894
|
setChecked(el, binding, vnode);
|
|
13881
13895
|
}
|
|
13882
13896
|
};
|
|
13883
|
-
function setChecked(el, { value }, vnode) {
|
|
13897
|
+
function setChecked(el, { value, oldValue }, vnode) {
|
|
13884
13898
|
el._modelValue = value;
|
|
13885
13899
|
let checked;
|
|
13886
13900
|
if (isArray(value)) {
|
|
@@ -13888,6 +13902,7 @@ function setChecked(el, { value }, vnode) {
|
|
|
13888
13902
|
} else if (isSet(value)) {
|
|
13889
13903
|
checked = value.has(vnode.props.value);
|
|
13890
13904
|
} else {
|
|
13905
|
+
if (value === oldValue) return;
|
|
13891
13906
|
checked = looseEqual(value, getCheckboxValue(el, true));
|
|
13892
13907
|
}
|
|
13893
13908
|
if (el.checked !== checked) {
|
|
@@ -14704,12 +14719,13 @@ function createConditionalExpression(test, consequent, alternate, newline = true
|
|
|
14704
14719
|
loc: locStub
|
|
14705
14720
|
};
|
|
14706
14721
|
}
|
|
14707
|
-
function createCacheExpression(index, value, needPauseTracking = false) {
|
|
14722
|
+
function createCacheExpression(index, value, needPauseTracking = false, inVOnce = false) {
|
|
14708
14723
|
return {
|
|
14709
14724
|
type: 20,
|
|
14710
14725
|
index,
|
|
14711
14726
|
value,
|
|
14712
14727
|
needPauseTracking,
|
|
14728
|
+
inVOnce,
|
|
14713
14729
|
needArraySpread: false,
|
|
14714
14730
|
loc: locStub
|
|
14715
14731
|
};
|
|
@@ -17023,6 +17039,9 @@ function getLoc(start, end) {
|
|
|
17023
17039
|
source: end == null ? end : getSlice(start, end)
|
|
17024
17040
|
};
|
|
17025
17041
|
}
|
|
17042
|
+
function cloneLoc(loc) {
|
|
17043
|
+
return getLoc(loc.start.offset, loc.end.offset);
|
|
17044
|
+
}
|
|
17026
17045
|
function setLocEnd(loc, end) {
|
|
17027
17046
|
loc.end = tokenizer.getPos(end);
|
|
17028
17047
|
loc.source = getSlice(loc.start.offset, end);
|
|
@@ -17571,11 +17590,12 @@ function createTransformContext(root, {
|
|
|
17571
17590
|
identifier.hoisted = exp;
|
|
17572
17591
|
return identifier;
|
|
17573
17592
|
},
|
|
17574
|
-
cache(exp, isVNode = false) {
|
|
17593
|
+
cache(exp, isVNode = false, inVOnce = false) {
|
|
17575
17594
|
const cacheExp = createCacheExpression(
|
|
17576
17595
|
context.cached.length,
|
|
17577
17596
|
exp,
|
|
17578
|
-
isVNode
|
|
17597
|
+
isVNode,
|
|
17598
|
+
inVOnce
|
|
17579
17599
|
);
|
|
17580
17600
|
context.cached.push(cacheExp);
|
|
17581
17601
|
return cacheExp;
|
|
@@ -18431,7 +18451,9 @@ function genCacheExpression(node, context) {
|
|
|
18431
18451
|
push(`_cache[${node.index}] || (`);
|
|
18432
18452
|
if (needPauseTracking) {
|
|
18433
18453
|
indent();
|
|
18434
|
-
push(`${helper(SET_BLOCK_TRACKING)}(-1)
|
|
18454
|
+
push(`${helper(SET_BLOCK_TRACKING)}(-1`);
|
|
18455
|
+
if (node.inVOnce) push(`, true`);
|
|
18456
|
+
push(`),`);
|
|
18435
18457
|
newline();
|
|
18436
18458
|
push(`(`);
|
|
18437
18459
|
}
|
|
@@ -18519,12 +18541,14 @@ const transformExpression = (node, context) => {
|
|
|
18519
18541
|
context
|
|
18520
18542
|
);
|
|
18521
18543
|
} else if (node.type === 1) {
|
|
18544
|
+
const memo = findDir(node, "memo");
|
|
18522
18545
|
for (let i = 0; i < node.props.length; i++) {
|
|
18523
18546
|
const dir = node.props[i];
|
|
18524
18547
|
if (dir.type === 7 && dir.name !== "for") {
|
|
18525
18548
|
const exp = dir.exp;
|
|
18526
18549
|
const arg = dir.arg;
|
|
18527
|
-
if (exp && exp.type === 4 && !(dir.name === "on" && arg))
|
|
18550
|
+
if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor)
|
|
18551
|
+
!(memo && arg && arg.type === 4 && arg.content === "key")) {
|
|
18528
18552
|
dir.exp = processExpression(
|
|
18529
18553
|
exp,
|
|
18530
18554
|
context,
|
|
@@ -18785,7 +18809,7 @@ function processIf(node, dir, context, processCodegen) {
|
|
|
18785
18809
|
const branch = createIfBranch(node, dir);
|
|
18786
18810
|
const ifNode = {
|
|
18787
18811
|
type: 9,
|
|
18788
|
-
loc: node.loc,
|
|
18812
|
+
loc: cloneLoc(node.loc),
|
|
18789
18813
|
branches: [branch]
|
|
18790
18814
|
};
|
|
18791
18815
|
context.replaceNode(ifNode);
|
|
@@ -19052,10 +19076,19 @@ const transformFor = createStructuralDirectiveTransform(
|
|
|
19052
19076
|
const isTemplate = isTemplateNode(node);
|
|
19053
19077
|
const memo = findDir(node, "memo");
|
|
19054
19078
|
const keyProp = findProp(node, `key`, false, true);
|
|
19055
|
-
|
|
19079
|
+
const isDirKey = keyProp && keyProp.type === 7;
|
|
19080
|
+
if (isDirKey && !keyProp.exp) {
|
|
19056
19081
|
transformBindShorthand(keyProp, context);
|
|
19057
19082
|
}
|
|
19058
|
-
|
|
19083
|
+
let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
|
|
19084
|
+
if (memo && keyExp && isDirKey) {
|
|
19085
|
+
{
|
|
19086
|
+
keyProp.exp = keyExp = processExpression(
|
|
19087
|
+
keyExp,
|
|
19088
|
+
context
|
|
19089
|
+
);
|
|
19090
|
+
}
|
|
19091
|
+
}
|
|
19059
19092
|
const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
|
|
19060
19093
|
if (isTemplate) {
|
|
19061
19094
|
if (memo) {
|
|
@@ -20447,8 +20480,8 @@ const transformOnce = (node, context) => {
|
|
|
20447
20480
|
if (cur.codegenNode) {
|
|
20448
20481
|
cur.codegenNode = context.cache(
|
|
20449
20482
|
cur.codegenNode,
|
|
20483
|
+
true,
|
|
20450
20484
|
true
|
|
20451
|
-
/* isVNode */
|
|
20452
20485
|
);
|
|
20453
20486
|
}
|
|
20454
20487
|
};
|
|
@@ -21302,7 +21335,7 @@ function analyzeNode(node) {
|
|
|
21302
21335
|
if (p.exp && (p.exp.type === 8 || p.exp.constType < 3)) {
|
|
21303
21336
|
return bail();
|
|
21304
21337
|
}
|
|
21305
|
-
if (isOptionTag && isStaticArgOf(p.arg, "value") && p.exp && p.exp.
|
|
21338
|
+
if (isOptionTag && isStaticArgOf(p.arg, "value") && p.exp && !p.exp.isStatic) {
|
|
21306
21339
|
return bail();
|
|
21307
21340
|
}
|
|
21308
21341
|
}
|