@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
|
@@ -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
|
**/
|
|
@@ -690,16 +690,16 @@ function removeSub(link, soft = false) {
|
|
|
690
690
|
nextSub.prevSub = prevSub;
|
|
691
691
|
link.nextSub = void 0;
|
|
692
692
|
}
|
|
693
|
-
if (dep.subs === link) {
|
|
694
|
-
dep.subs = prevSub;
|
|
695
|
-
}
|
|
696
693
|
if (dep.subsHead === link) {
|
|
697
694
|
dep.subsHead = nextSub;
|
|
698
695
|
}
|
|
699
|
-
if (
|
|
700
|
-
dep.
|
|
701
|
-
|
|
702
|
-
|
|
696
|
+
if (dep.subs === link) {
|
|
697
|
+
dep.subs = prevSub;
|
|
698
|
+
if (!prevSub && dep.computed) {
|
|
699
|
+
dep.computed.flags &= ~4;
|
|
700
|
+
for (let l = dep.computed.deps; l; l = l.nextDep) {
|
|
701
|
+
removeSub(l, true);
|
|
702
|
+
}
|
|
703
703
|
}
|
|
704
704
|
}
|
|
705
705
|
if (!soft && !--dep.sc && dep.map) {
|
|
@@ -959,7 +959,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
959
959
|
}
|
|
960
960
|
});
|
|
961
961
|
} else {
|
|
962
|
-
if (key !== void 0) {
|
|
962
|
+
if (key !== void 0 || depsMap.has(void 0)) {
|
|
963
963
|
run(depsMap.get(key));
|
|
964
964
|
}
|
|
965
965
|
if (isArrayIndex) {
|
|
@@ -1334,117 +1334,6 @@ const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true
|
|
|
1334
1334
|
|
|
1335
1335
|
const toShallow = (value) => value;
|
|
1336
1336
|
const getProto = (v) => Reflect.getPrototypeOf(v);
|
|
1337
|
-
function get(target, key, isReadonly2 = false, isShallow2 = false) {
|
|
1338
|
-
target = target["__v_raw"];
|
|
1339
|
-
const rawTarget = toRaw(target);
|
|
1340
|
-
const rawKey = toRaw(key);
|
|
1341
|
-
if (!isReadonly2) {
|
|
1342
|
-
if (hasChanged(key, rawKey)) {
|
|
1343
|
-
track(rawTarget, "get", key);
|
|
1344
|
-
}
|
|
1345
|
-
track(rawTarget, "get", rawKey);
|
|
1346
|
-
}
|
|
1347
|
-
const { has: has2 } = getProto(rawTarget);
|
|
1348
|
-
const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
1349
|
-
if (has2.call(rawTarget, key)) {
|
|
1350
|
-
return wrap(target.get(key));
|
|
1351
|
-
} else if (has2.call(rawTarget, rawKey)) {
|
|
1352
|
-
return wrap(target.get(rawKey));
|
|
1353
|
-
} else if (target !== rawTarget) {
|
|
1354
|
-
target.get(key);
|
|
1355
|
-
}
|
|
1356
|
-
}
|
|
1357
|
-
function has(key, isReadonly2 = false) {
|
|
1358
|
-
const target = this["__v_raw"];
|
|
1359
|
-
const rawTarget = toRaw(target);
|
|
1360
|
-
const rawKey = toRaw(key);
|
|
1361
|
-
if (!isReadonly2) {
|
|
1362
|
-
if (hasChanged(key, rawKey)) {
|
|
1363
|
-
track(rawTarget, "has", key);
|
|
1364
|
-
}
|
|
1365
|
-
track(rawTarget, "has", rawKey);
|
|
1366
|
-
}
|
|
1367
|
-
return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
|
|
1368
|
-
}
|
|
1369
|
-
function size(target, isReadonly2 = false) {
|
|
1370
|
-
target = target["__v_raw"];
|
|
1371
|
-
!isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
|
|
1372
|
-
return Reflect.get(target, "size", target);
|
|
1373
|
-
}
|
|
1374
|
-
function add(value, _isShallow = false) {
|
|
1375
|
-
if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
|
|
1376
|
-
value = toRaw(value);
|
|
1377
|
-
}
|
|
1378
|
-
const target = toRaw(this);
|
|
1379
|
-
const proto = getProto(target);
|
|
1380
|
-
const hadKey = proto.has.call(target, value);
|
|
1381
|
-
if (!hadKey) {
|
|
1382
|
-
target.add(value);
|
|
1383
|
-
trigger(target, "add", value, value);
|
|
1384
|
-
}
|
|
1385
|
-
return this;
|
|
1386
|
-
}
|
|
1387
|
-
function set(key, value, _isShallow = false) {
|
|
1388
|
-
if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
|
|
1389
|
-
value = toRaw(value);
|
|
1390
|
-
}
|
|
1391
|
-
const target = toRaw(this);
|
|
1392
|
-
const { has: has2, get: get2 } = getProto(target);
|
|
1393
|
-
let hadKey = has2.call(target, key);
|
|
1394
|
-
if (!hadKey) {
|
|
1395
|
-
key = toRaw(key);
|
|
1396
|
-
hadKey = has2.call(target, key);
|
|
1397
|
-
} else {
|
|
1398
|
-
checkIdentityKeys(target, has2, key);
|
|
1399
|
-
}
|
|
1400
|
-
const oldValue = get2.call(target, key);
|
|
1401
|
-
target.set(key, value);
|
|
1402
|
-
if (!hadKey) {
|
|
1403
|
-
trigger(target, "add", key, value);
|
|
1404
|
-
} else if (hasChanged(value, oldValue)) {
|
|
1405
|
-
trigger(target, "set", key, value, oldValue);
|
|
1406
|
-
}
|
|
1407
|
-
return this;
|
|
1408
|
-
}
|
|
1409
|
-
function deleteEntry(key) {
|
|
1410
|
-
const target = toRaw(this);
|
|
1411
|
-
const { has: has2, get: get2 } = getProto(target);
|
|
1412
|
-
let hadKey = has2.call(target, key);
|
|
1413
|
-
if (!hadKey) {
|
|
1414
|
-
key = toRaw(key);
|
|
1415
|
-
hadKey = has2.call(target, key);
|
|
1416
|
-
} else {
|
|
1417
|
-
checkIdentityKeys(target, has2, key);
|
|
1418
|
-
}
|
|
1419
|
-
const oldValue = get2 ? get2.call(target, key) : void 0;
|
|
1420
|
-
const result = target.delete(key);
|
|
1421
|
-
if (hadKey) {
|
|
1422
|
-
trigger(target, "delete", key, void 0, oldValue);
|
|
1423
|
-
}
|
|
1424
|
-
return result;
|
|
1425
|
-
}
|
|
1426
|
-
function clear() {
|
|
1427
|
-
const target = toRaw(this);
|
|
1428
|
-
const hadItems = target.size !== 0;
|
|
1429
|
-
const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
|
|
1430
|
-
const result = target.clear();
|
|
1431
|
-
if (hadItems) {
|
|
1432
|
-
trigger(target, "clear", void 0, void 0, oldTarget);
|
|
1433
|
-
}
|
|
1434
|
-
return result;
|
|
1435
|
-
}
|
|
1436
|
-
function createForEach(isReadonly2, isShallow2) {
|
|
1437
|
-
return function forEach(callback, thisArg) {
|
|
1438
|
-
const observed = this;
|
|
1439
|
-
const target = observed["__v_raw"];
|
|
1440
|
-
const rawTarget = toRaw(target);
|
|
1441
|
-
const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
1442
|
-
!isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
|
|
1443
|
-
return target.forEach((value, key) => {
|
|
1444
|
-
return callback.call(thisArg, wrap(value), wrap(key), observed);
|
|
1445
|
-
});
|
|
1446
|
-
};
|
|
1447
|
-
}
|
|
1448
1337
|
function createIterableMethod(method, isReadonly2, isShallow2) {
|
|
1449
1338
|
return function(...args) {
|
|
1450
1339
|
const target = this["__v_raw"];
|
|
@@ -1487,71 +1376,134 @@ function createReadonlyMethod(type) {
|
|
|
1487
1376
|
return type === "delete" ? false : type === "clear" ? void 0 : this;
|
|
1488
1377
|
};
|
|
1489
1378
|
}
|
|
1490
|
-
function createInstrumentations() {
|
|
1491
|
-
const
|
|
1492
|
-
get(key) {
|
|
1493
|
-
return get(this, key);
|
|
1494
|
-
},
|
|
1495
|
-
get size() {
|
|
1496
|
-
return size(this);
|
|
1497
|
-
},
|
|
1498
|
-
has,
|
|
1499
|
-
add,
|
|
1500
|
-
set,
|
|
1501
|
-
delete: deleteEntry,
|
|
1502
|
-
clear,
|
|
1503
|
-
forEach: createForEach(false, false)
|
|
1504
|
-
};
|
|
1505
|
-
const shallowInstrumentations2 = {
|
|
1379
|
+
function createInstrumentations(readonly, shallow) {
|
|
1380
|
+
const instrumentations = {
|
|
1506
1381
|
get(key) {
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
return get(this, key, true);
|
|
1526
|
-
},
|
|
1527
|
-
get size() {
|
|
1528
|
-
return size(this, true);
|
|
1529
|
-
},
|
|
1530
|
-
has(key) {
|
|
1531
|
-
return has.call(this, key, true);
|
|
1532
|
-
},
|
|
1533
|
-
add: createReadonlyMethod("add"),
|
|
1534
|
-
set: createReadonlyMethod("set"),
|
|
1535
|
-
delete: createReadonlyMethod("delete"),
|
|
1536
|
-
clear: createReadonlyMethod("clear"),
|
|
1537
|
-
forEach: createForEach(true, false)
|
|
1538
|
-
};
|
|
1539
|
-
const shallowReadonlyInstrumentations2 = {
|
|
1540
|
-
get(key) {
|
|
1541
|
-
return get(this, key, true, true);
|
|
1382
|
+
const target = this["__v_raw"];
|
|
1383
|
+
const rawTarget = toRaw(target);
|
|
1384
|
+
const rawKey = toRaw(key);
|
|
1385
|
+
if (!readonly) {
|
|
1386
|
+
if (hasChanged(key, rawKey)) {
|
|
1387
|
+
track(rawTarget, "get", key);
|
|
1388
|
+
}
|
|
1389
|
+
track(rawTarget, "get", rawKey);
|
|
1390
|
+
}
|
|
1391
|
+
const { has } = getProto(rawTarget);
|
|
1392
|
+
const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
|
|
1393
|
+
if (has.call(rawTarget, key)) {
|
|
1394
|
+
return wrap(target.get(key));
|
|
1395
|
+
} else if (has.call(rawTarget, rawKey)) {
|
|
1396
|
+
return wrap(target.get(rawKey));
|
|
1397
|
+
} else if (target !== rawTarget) {
|
|
1398
|
+
target.get(key);
|
|
1399
|
+
}
|
|
1542
1400
|
},
|
|
1543
1401
|
get size() {
|
|
1544
|
-
|
|
1402
|
+
const target = this["__v_raw"];
|
|
1403
|
+
!readonly && track(toRaw(target), "iterate", ITERATE_KEY);
|
|
1404
|
+
return Reflect.get(target, "size", target);
|
|
1545
1405
|
},
|
|
1546
1406
|
has(key) {
|
|
1547
|
-
|
|
1407
|
+
const target = this["__v_raw"];
|
|
1408
|
+
const rawTarget = toRaw(target);
|
|
1409
|
+
const rawKey = toRaw(key);
|
|
1410
|
+
if (!readonly) {
|
|
1411
|
+
if (hasChanged(key, rawKey)) {
|
|
1412
|
+
track(rawTarget, "has", key);
|
|
1413
|
+
}
|
|
1414
|
+
track(rawTarget, "has", rawKey);
|
|
1415
|
+
}
|
|
1416
|
+
return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
|
|
1548
1417
|
},
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1418
|
+
forEach(callback, thisArg) {
|
|
1419
|
+
const observed = this;
|
|
1420
|
+
const target = observed["__v_raw"];
|
|
1421
|
+
const rawTarget = toRaw(target);
|
|
1422
|
+
const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
|
|
1423
|
+
!readonly && track(rawTarget, "iterate", ITERATE_KEY);
|
|
1424
|
+
return target.forEach((value, key) => {
|
|
1425
|
+
return callback.call(thisArg, wrap(value), wrap(key), observed);
|
|
1426
|
+
});
|
|
1427
|
+
}
|
|
1554
1428
|
};
|
|
1429
|
+
extend(
|
|
1430
|
+
instrumentations,
|
|
1431
|
+
readonly ? {
|
|
1432
|
+
add: createReadonlyMethod("add"),
|
|
1433
|
+
set: createReadonlyMethod("set"),
|
|
1434
|
+
delete: createReadonlyMethod("delete"),
|
|
1435
|
+
clear: createReadonlyMethod("clear")
|
|
1436
|
+
} : {
|
|
1437
|
+
add(value) {
|
|
1438
|
+
if (!shallow && !isShallow(value) && !isReadonly(value)) {
|
|
1439
|
+
value = toRaw(value);
|
|
1440
|
+
}
|
|
1441
|
+
const target = toRaw(this);
|
|
1442
|
+
const proto = getProto(target);
|
|
1443
|
+
const hadKey = proto.has.call(target, value);
|
|
1444
|
+
if (!hadKey) {
|
|
1445
|
+
target.add(value);
|
|
1446
|
+
trigger(target, "add", value, value);
|
|
1447
|
+
}
|
|
1448
|
+
return this;
|
|
1449
|
+
},
|
|
1450
|
+
set(key, value) {
|
|
1451
|
+
if (!shallow && !isShallow(value) && !isReadonly(value)) {
|
|
1452
|
+
value = toRaw(value);
|
|
1453
|
+
}
|
|
1454
|
+
const target = toRaw(this);
|
|
1455
|
+
const { has, get } = getProto(target);
|
|
1456
|
+
let hadKey = has.call(target, key);
|
|
1457
|
+
if (!hadKey) {
|
|
1458
|
+
key = toRaw(key);
|
|
1459
|
+
hadKey = has.call(target, key);
|
|
1460
|
+
} else {
|
|
1461
|
+
checkIdentityKeys(target, has, key);
|
|
1462
|
+
}
|
|
1463
|
+
const oldValue = get.call(target, key);
|
|
1464
|
+
target.set(key, value);
|
|
1465
|
+
if (!hadKey) {
|
|
1466
|
+
trigger(target, "add", key, value);
|
|
1467
|
+
} else if (hasChanged(value, oldValue)) {
|
|
1468
|
+
trigger(target, "set", key, value, oldValue);
|
|
1469
|
+
}
|
|
1470
|
+
return this;
|
|
1471
|
+
},
|
|
1472
|
+
delete(key) {
|
|
1473
|
+
const target = toRaw(this);
|
|
1474
|
+
const { has, get } = getProto(target);
|
|
1475
|
+
let hadKey = has.call(target, key);
|
|
1476
|
+
if (!hadKey) {
|
|
1477
|
+
key = toRaw(key);
|
|
1478
|
+
hadKey = has.call(target, key);
|
|
1479
|
+
} else {
|
|
1480
|
+
checkIdentityKeys(target, has, key);
|
|
1481
|
+
}
|
|
1482
|
+
const oldValue = get ? get.call(target, key) : void 0;
|
|
1483
|
+
const result = target.delete(key);
|
|
1484
|
+
if (hadKey) {
|
|
1485
|
+
trigger(target, "delete", key, void 0, oldValue);
|
|
1486
|
+
}
|
|
1487
|
+
return result;
|
|
1488
|
+
},
|
|
1489
|
+
clear() {
|
|
1490
|
+
const target = toRaw(this);
|
|
1491
|
+
const hadItems = target.size !== 0;
|
|
1492
|
+
const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
|
|
1493
|
+
const result = target.clear();
|
|
1494
|
+
if (hadItems) {
|
|
1495
|
+
trigger(
|
|
1496
|
+
target,
|
|
1497
|
+
"clear",
|
|
1498
|
+
void 0,
|
|
1499
|
+
void 0,
|
|
1500
|
+
oldTarget
|
|
1501
|
+
);
|
|
1502
|
+
}
|
|
1503
|
+
return result;
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
);
|
|
1555
1507
|
const iteratorMethods = [
|
|
1556
1508
|
"keys",
|
|
1557
1509
|
"values",
|
|
@@ -1559,30 +1511,12 @@ function createInstrumentations() {
|
|
|
1559
1511
|
Symbol.iterator
|
|
1560
1512
|
];
|
|
1561
1513
|
iteratorMethods.forEach((method) => {
|
|
1562
|
-
|
|
1563
|
-
readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
|
|
1564
|
-
shallowInstrumentations2[method] = createIterableMethod(method, false, true);
|
|
1565
|
-
shallowReadonlyInstrumentations2[method] = createIterableMethod(
|
|
1566
|
-
method,
|
|
1567
|
-
true,
|
|
1568
|
-
true
|
|
1569
|
-
);
|
|
1514
|
+
instrumentations[method] = createIterableMethod(method, readonly, shallow);
|
|
1570
1515
|
});
|
|
1571
|
-
return
|
|
1572
|
-
mutableInstrumentations2,
|
|
1573
|
-
readonlyInstrumentations2,
|
|
1574
|
-
shallowInstrumentations2,
|
|
1575
|
-
shallowReadonlyInstrumentations2
|
|
1576
|
-
];
|
|
1516
|
+
return instrumentations;
|
|
1577
1517
|
}
|
|
1578
|
-
const [
|
|
1579
|
-
mutableInstrumentations,
|
|
1580
|
-
readonlyInstrumentations,
|
|
1581
|
-
shallowInstrumentations,
|
|
1582
|
-
shallowReadonlyInstrumentations
|
|
1583
|
-
] = /* @__PURE__ */ createInstrumentations();
|
|
1584
1518
|
function createInstrumentationGetter(isReadonly2, shallow) {
|
|
1585
|
-
const instrumentations =
|
|
1519
|
+
const instrumentations = createInstrumentations(isReadonly2, shallow);
|
|
1586
1520
|
return (target, key, receiver) => {
|
|
1587
1521
|
if (key === "__v_isReactive") {
|
|
1588
1522
|
return !isReadonly2;
|
|
@@ -1610,9 +1544,9 @@ const readonlyCollectionHandlers = {
|
|
|
1610
1544
|
const shallowReadonlyCollectionHandlers = {
|
|
1611
1545
|
get: /* @__PURE__ */ createInstrumentationGetter(true, true)
|
|
1612
1546
|
};
|
|
1613
|
-
function checkIdentityKeys(target,
|
|
1547
|
+
function checkIdentityKeys(target, has, key) {
|
|
1614
1548
|
const rawKey = toRaw(key);
|
|
1615
|
-
if (rawKey !== key &&
|
|
1549
|
+
if (rawKey !== key && has.call(target, rawKey)) {
|
|
1616
1550
|
const type = toRawType(target);
|
|
1617
1551
|
warn$2(
|
|
1618
1552
|
`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.`
|
|
@@ -3566,7 +3500,7 @@ const TeleportImpl = {
|
|
|
3566
3500
|
}
|
|
3567
3501
|
if (!disabled) {
|
|
3568
3502
|
mount(target, targetAnchor);
|
|
3569
|
-
updateCssVars(n2);
|
|
3503
|
+
updateCssVars(n2, false);
|
|
3570
3504
|
}
|
|
3571
3505
|
} else if (!disabled) {
|
|
3572
3506
|
warn$1(
|
|
@@ -3578,7 +3512,7 @@ const TeleportImpl = {
|
|
|
3578
3512
|
};
|
|
3579
3513
|
if (disabled) {
|
|
3580
3514
|
mount(container, mainAnchor);
|
|
3581
|
-
updateCssVars(n2);
|
|
3515
|
+
updateCssVars(n2, true);
|
|
3582
3516
|
}
|
|
3583
3517
|
if (isTeleportDeferred(n2.props)) {
|
|
3584
3518
|
queuePostRenderEffect(mountToTarget, parentSuspense);
|
|
@@ -3668,7 +3602,7 @@ const TeleportImpl = {
|
|
|
3668
3602
|
);
|
|
3669
3603
|
}
|
|
3670
3604
|
}
|
|
3671
|
-
updateCssVars(n2);
|
|
3605
|
+
updateCssVars(n2, disabled);
|
|
3672
3606
|
}
|
|
3673
3607
|
},
|
|
3674
3608
|
remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
@@ -3736,9 +3670,10 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
3736
3670
|
querySelector
|
|
3737
3671
|
);
|
|
3738
3672
|
if (target) {
|
|
3673
|
+
const disabled = isTeleportDisabled(vnode.props);
|
|
3739
3674
|
const targetNode = target._lpa || target.firstChild;
|
|
3740
3675
|
if (vnode.shapeFlag & 16) {
|
|
3741
|
-
if (
|
|
3676
|
+
if (disabled) {
|
|
3742
3677
|
vnode.anchor = hydrateChildren(
|
|
3743
3678
|
nextSibling(node),
|
|
3744
3679
|
vnode,
|
|
@@ -3779,16 +3714,23 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
3779
3714
|
);
|
|
3780
3715
|
}
|
|
3781
3716
|
}
|
|
3782
|
-
updateCssVars(vnode);
|
|
3717
|
+
updateCssVars(vnode, disabled);
|
|
3783
3718
|
}
|
|
3784
3719
|
return vnode.anchor && nextSibling(vnode.anchor);
|
|
3785
3720
|
}
|
|
3786
3721
|
const Teleport = TeleportImpl;
|
|
3787
|
-
function updateCssVars(vnode) {
|
|
3722
|
+
function updateCssVars(vnode, isDisabled) {
|
|
3788
3723
|
const ctx = vnode.ctx;
|
|
3789
3724
|
if (ctx && ctx.ut) {
|
|
3790
|
-
let node
|
|
3791
|
-
|
|
3725
|
+
let node, anchor;
|
|
3726
|
+
if (isDisabled) {
|
|
3727
|
+
node = vnode.el;
|
|
3728
|
+
anchor = vnode.anchor;
|
|
3729
|
+
} else {
|
|
3730
|
+
node = vnode.targetStart;
|
|
3731
|
+
anchor = vnode.targetAnchor;
|
|
3732
|
+
}
|
|
3733
|
+
while (node && node !== anchor) {
|
|
3792
3734
|
if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid);
|
|
3793
3735
|
node = node.nextSibling;
|
|
3794
3736
|
}
|
|
@@ -4241,8 +4183,15 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4241
4183
|
const setupState = owner.setupState;
|
|
4242
4184
|
const rawSetupState = toRaw(setupState);
|
|
4243
4185
|
const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {
|
|
4244
|
-
|
|
4245
|
-
|
|
4186
|
+
{
|
|
4187
|
+
if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
|
|
4188
|
+
warn$1(
|
|
4189
|
+
`Template ref "${key}" used on a non-ref value. It will not work in the production build.`
|
|
4190
|
+
);
|
|
4191
|
+
}
|
|
4192
|
+
if (knownTemplateRefs.has(rawSetupState[key])) {
|
|
4193
|
+
return false;
|
|
4194
|
+
}
|
|
4246
4195
|
}
|
|
4247
4196
|
return hasOwn(rawSetupState, key);
|
|
4248
4197
|
};
|
|
@@ -4539,7 +4488,11 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4539
4488
|
}
|
|
4540
4489
|
let needCallTransitionHooks = false;
|
|
4541
4490
|
if (isTemplateNode(el)) {
|
|
4542
|
-
needCallTransitionHooks = needTransition(
|
|
4491
|
+
needCallTransitionHooks = needTransition(
|
|
4492
|
+
null,
|
|
4493
|
+
// no need check parentSuspense in hydration
|
|
4494
|
+
transition
|
|
4495
|
+
) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
|
|
4543
4496
|
const content = el.content.firstChild;
|
|
4544
4497
|
if (needCallTransitionHooks) {
|
|
4545
4498
|
transition.beforeEnter(content);
|
|
@@ -4932,6 +4885,8 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
4932
4885
|
}
|
|
4933
4886
|
}
|
|
4934
4887
|
|
|
4888
|
+
const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
|
|
4889
|
+
const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
|
|
4935
4890
|
const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
|
|
4936
4891
|
const id = requestIdleCallback(hydrate, { timeout });
|
|
4937
4892
|
return () => cancelIdleCallback(id);
|
|
@@ -5925,12 +5880,13 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
|
5925
5880
|
}
|
|
5926
5881
|
openBlock();
|
|
5927
5882
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
5883
|
+
const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch
|
|
5884
|
+
// key attached in the `createSlots` helper, respect that
|
|
5885
|
+
validSlotContent && validSlotContent.key;
|
|
5928
5886
|
const rendered = createBlock(
|
|
5929
5887
|
Fragment,
|
|
5930
5888
|
{
|
|
5931
|
-
key: (
|
|
5932
|
-
// key attached in the `createSlots` helper, respect that
|
|
5933
|
-
validSlotContent && validSlotContent.key || `_${name}`) + // #7256 force differentiate fallback content from actual content
|
|
5889
|
+
key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
|
|
5934
5890
|
(!validSlotContent && fallback ? "_fb" : "")
|
|
5935
5891
|
},
|
|
5936
5892
|
validSlotContent || (fallback ? fallback() : []),
|
|
@@ -7099,7 +7055,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7099
7055
|
return vm;
|
|
7100
7056
|
}
|
|
7101
7057
|
}
|
|
7102
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
7058
|
+
Vue.version = `2.6.14-compat:${"3.5.12"}`;
|
|
7103
7059
|
Vue.config = singletonApp.config;
|
|
7104
7060
|
Vue.use = (plugin, ...options) => {
|
|
7105
7061
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -8087,6 +8043,7 @@ function getType(ctor) {
|
|
|
8087
8043
|
function validateProps(rawProps, props, instance) {
|
|
8088
8044
|
const resolvedValues = toRaw(props);
|
|
8089
8045
|
const options = instance.propsOptions[0];
|
|
8046
|
+
const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key));
|
|
8090
8047
|
for (const key in options) {
|
|
8091
8048
|
let opt = options[key];
|
|
8092
8049
|
if (opt == null) continue;
|
|
@@ -8095,7 +8052,7 @@ function validateProps(rawProps, props, instance) {
|
|
|
8095
8052
|
resolvedValues[key],
|
|
8096
8053
|
opt,
|
|
8097
8054
|
shallowReadonly(resolvedValues) ,
|
|
8098
|
-
!
|
|
8055
|
+
!camelizePropsKey.includes(key)
|
|
8099
8056
|
);
|
|
8100
8057
|
}
|
|
8101
8058
|
}
|
|
@@ -9909,14 +9866,13 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
9909
9866
|
}
|
|
9910
9867
|
const baseWatchOptions = extend({}, options);
|
|
9911
9868
|
baseWatchOptions.onWarn = warn$1;
|
|
9869
|
+
const runsImmediately = cb && immediate || !cb && flush !== "post";
|
|
9912
9870
|
let ssrCleanup;
|
|
9913
9871
|
if (isInSSRComponentSetup) {
|
|
9914
9872
|
if (flush === "sync") {
|
|
9915
9873
|
const ctx = useSSRContext();
|
|
9916
9874
|
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
9917
|
-
} else if (!
|
|
9918
|
-
baseWatchOptions.once = true;
|
|
9919
|
-
} else {
|
|
9875
|
+
} else if (!runsImmediately) {
|
|
9920
9876
|
const watchStopHandle = () => {
|
|
9921
9877
|
};
|
|
9922
9878
|
watchStopHandle.stop = NOOP;
|
|
@@ -9955,7 +9911,13 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
9955
9911
|
}
|
|
9956
9912
|
};
|
|
9957
9913
|
const watchHandle = watch$1(source, cb, baseWatchOptions);
|
|
9958
|
-
if (
|
|
9914
|
+
if (isInSSRComponentSetup) {
|
|
9915
|
+
if (ssrCleanup) {
|
|
9916
|
+
ssrCleanup.push(watchHandle);
|
|
9917
|
+
} else if (runsImmediately) {
|
|
9918
|
+
watchHandle();
|
|
9919
|
+
}
|
|
9920
|
+
}
|
|
9959
9921
|
return watchHandle;
|
|
9960
9922
|
}
|
|
9961
9923
|
function instanceWatch(source, value, options) {
|
|
@@ -9990,19 +9952,19 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
9990
9952
|
warn$1(`useModel() called without active instance.`);
|
|
9991
9953
|
return ref();
|
|
9992
9954
|
}
|
|
9993
|
-
|
|
9955
|
+
const camelizedName = camelize(name);
|
|
9956
|
+
if (!i.propsOptions[0][camelizedName]) {
|
|
9994
9957
|
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
|
9995
9958
|
return ref();
|
|
9996
9959
|
}
|
|
9997
|
-
const camelizedName = camelize(name);
|
|
9998
9960
|
const hyphenatedName = hyphenate(name);
|
|
9999
|
-
const modifiers = getModelModifiers(props,
|
|
9961
|
+
const modifiers = getModelModifiers(props, camelizedName);
|
|
10000
9962
|
const res = customRef((track, trigger) => {
|
|
10001
9963
|
let localValue;
|
|
10002
9964
|
let prevSetValue = EMPTY_OBJ;
|
|
10003
9965
|
let prevEmittedValue;
|
|
10004
9966
|
watchSyncEffect(() => {
|
|
10005
|
-
const propValue = props[
|
|
9967
|
+
const propValue = props[camelizedName];
|
|
10006
9968
|
if (hasChanged(localValue, propValue)) {
|
|
10007
9969
|
localValue = propValue;
|
|
10008
9970
|
trigger();
|
|
@@ -11724,9 +11686,9 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
11724
11686
|
}
|
|
11725
11687
|
const { setup } = Component;
|
|
11726
11688
|
if (setup) {
|
|
11689
|
+
pauseTracking();
|
|
11727
11690
|
const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
|
|
11728
11691
|
const reset = setCurrentInstance(instance);
|
|
11729
|
-
pauseTracking();
|
|
11730
11692
|
const setupResult = callWithErrorHandling(
|
|
11731
11693
|
setup,
|
|
11732
11694
|
instance,
|
|
@@ -11736,10 +11698,13 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
11736
11698
|
setupContext
|
|
11737
11699
|
]
|
|
11738
11700
|
);
|
|
11701
|
+
const isAsyncSetup = isPromise(setupResult);
|
|
11739
11702
|
resetTracking();
|
|
11740
11703
|
reset();
|
|
11741
|
-
if (
|
|
11742
|
-
|
|
11704
|
+
if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) {
|
|
11705
|
+
markAsyncBoundary(instance);
|
|
11706
|
+
}
|
|
11707
|
+
if (isAsyncSetup) {
|
|
11743
11708
|
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
11744
11709
|
if (isSSR) {
|
|
11745
11710
|
return setupResult.then((resolvedResult) => {
|
|
@@ -12214,7 +12179,7 @@ function isMemoSame(cached, memo) {
|
|
|
12214
12179
|
return true;
|
|
12215
12180
|
}
|
|
12216
12181
|
|
|
12217
|
-
const version = "3.5.
|
|
12182
|
+
const version = "3.5.12";
|
|
12218
12183
|
const warn = warn$1 ;
|
|
12219
12184
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12220
12185
|
const devtools = devtools$1 ;
|
|
@@ -12919,7 +12884,7 @@ function compatCoerceAttr(el, key, value, instance = null) {
|
|
|
12919
12884
|
return false;
|
|
12920
12885
|
}
|
|
12921
12886
|
|
|
12922
|
-
function patchDOMProp(el, key, value, parentComponent) {
|
|
12887
|
+
function patchDOMProp(el, key, value, parentComponent, attrName) {
|
|
12923
12888
|
if (key === "innerHTML" || key === "textContent") {
|
|
12924
12889
|
if (value != null) {
|
|
12925
12890
|
el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
|
|
@@ -12983,7 +12948,7 @@ function patchDOMProp(el, key, value, parentComponent) {
|
|
|
12983
12948
|
);
|
|
12984
12949
|
}
|
|
12985
12950
|
}
|
|
12986
|
-
needRemove && el.removeAttribute(key);
|
|
12951
|
+
needRemove && el.removeAttribute(attrName || key);
|
|
12987
12952
|
}
|
|
12988
12953
|
|
|
12989
12954
|
function addEventListener(el, event, handler, options) {
|
|
@@ -13093,7 +13058,7 @@ const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) =>
|
|
|
13093
13058
|
// #11081 force set props for possible async custom element
|
|
13094
13059
|
el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))
|
|
13095
13060
|
) {
|
|
13096
|
-
patchDOMProp(el, camelize(key), nextValue, parentComponent);
|
|
13061
|
+
patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
|
|
13097
13062
|
} else {
|
|
13098
13063
|
if (key === "true-value") {
|
|
13099
13064
|
el._trueValue = nextValue;
|
|
@@ -13820,7 +13785,7 @@ const vModelCheckbox = {
|
|
|
13820
13785
|
setChecked(el, binding, vnode);
|
|
13821
13786
|
}
|
|
13822
13787
|
};
|
|
13823
|
-
function setChecked(el, { value }, vnode) {
|
|
13788
|
+
function setChecked(el, { value, oldValue }, vnode) {
|
|
13824
13789
|
el._modelValue = value;
|
|
13825
13790
|
let checked;
|
|
13826
13791
|
if (isArray(value)) {
|
|
@@ -13828,6 +13793,7 @@ function setChecked(el, { value }, vnode) {
|
|
|
13828
13793
|
} else if (isSet(value)) {
|
|
13829
13794
|
checked = value.has(vnode.props.value);
|
|
13830
13795
|
} else {
|
|
13796
|
+
if (value === oldValue) return;
|
|
13831
13797
|
checked = looseEqual(value, getCheckboxValue(el, true));
|
|
13832
13798
|
}
|
|
13833
13799
|
if (el.checked !== checked) {
|