@vue/compat 3.2.19 → 3.2.23
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 +170 -101
- package/dist/vue.cjs.prod.js +137 -86
- package/dist/vue.esm-browser.js +159 -86
- package/dist/vue.esm-browser.prod.js +1 -1
- package/dist/vue.esm-bundler.js +160 -86
- package/dist/vue.global.js +158 -85
- package/dist/vue.global.prod.js +1 -1
- package/dist/vue.runtime.esm-browser.js +152 -80
- package/dist/vue.runtime.esm-browser.prod.js +1 -1
- package/dist/vue.runtime.esm-bundler.js +153 -80
- package/dist/vue.runtime.global.js +151 -79
- package/dist/vue.runtime.global.prod.js +1 -1
- package/package.json +2 -2
package/dist/vue.global.js
CHANGED
|
@@ -533,7 +533,7 @@ var Vue = (function () {
|
|
|
533
533
|
let effectTrackDepth = 0;
|
|
534
534
|
let trackOpBit = 1;
|
|
535
535
|
/**
|
|
536
|
-
* The bitwise track markers support at most 30 levels
|
|
536
|
+
* The bitwise track markers support at most 30 levels of recursion.
|
|
537
537
|
* This value is chosen to enable modern JS engines to use a SMI on all platforms.
|
|
538
538
|
* When recursion depth is greater, fall back to using a full cleanup.
|
|
539
539
|
*/
|
|
@@ -854,7 +854,7 @@ var Vue = (function () {
|
|
|
854
854
|
function createSetter(shallow = false) {
|
|
855
855
|
return function set(target, key, value, receiver) {
|
|
856
856
|
let oldValue = target[key];
|
|
857
|
-
if (!shallow) {
|
|
857
|
+
if (!shallow && !isReadonly(value)) {
|
|
858
858
|
value = toRaw(value);
|
|
859
859
|
oldValue = toRaw(oldValue);
|
|
860
860
|
if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
|
|
@@ -1527,19 +1527,22 @@ var Vue = (function () {
|
|
|
1527
1527
|
const id = instance.type.__hmrId;
|
|
1528
1528
|
let record = map.get(id);
|
|
1529
1529
|
if (!record) {
|
|
1530
|
-
createRecord(id);
|
|
1530
|
+
createRecord(id, instance.type);
|
|
1531
1531
|
record = map.get(id);
|
|
1532
1532
|
}
|
|
1533
|
-
record.add(instance);
|
|
1533
|
+
record.instances.add(instance);
|
|
1534
1534
|
}
|
|
1535
1535
|
function unregisterHMR(instance) {
|
|
1536
|
-
map.get(instance.type.__hmrId).delete(instance);
|
|
1536
|
+
map.get(instance.type.__hmrId).instances.delete(instance);
|
|
1537
1537
|
}
|
|
1538
|
-
function createRecord(id) {
|
|
1538
|
+
function createRecord(id, initialDef) {
|
|
1539
1539
|
if (map.has(id)) {
|
|
1540
1540
|
return false;
|
|
1541
1541
|
}
|
|
1542
|
-
map.set(id,
|
|
1542
|
+
map.set(id, {
|
|
1543
|
+
initialDef: normalizeClassComponent(initialDef),
|
|
1544
|
+
instances: new Set()
|
|
1545
|
+
});
|
|
1543
1546
|
return true;
|
|
1544
1547
|
}
|
|
1545
1548
|
function normalizeClassComponent(component) {
|
|
@@ -1550,7 +1553,9 @@ var Vue = (function () {
|
|
|
1550
1553
|
if (!record) {
|
|
1551
1554
|
return;
|
|
1552
1555
|
}
|
|
1553
|
-
|
|
1556
|
+
// update initial record (for not-yet-rendered component)
|
|
1557
|
+
record.initialDef.render = newRender;
|
|
1558
|
+
[...record.instances].forEach(instance => {
|
|
1554
1559
|
if (newRender) {
|
|
1555
1560
|
instance.render = newRender;
|
|
1556
1561
|
normalizeClassComponent(instance.type).render = newRender;
|
|
@@ -1567,17 +1572,16 @@ var Vue = (function () {
|
|
|
1567
1572
|
if (!record)
|
|
1568
1573
|
return;
|
|
1569
1574
|
newComp = normalizeClassComponent(newComp);
|
|
1575
|
+
// update initial def (for not-yet-rendered components)
|
|
1576
|
+
updateComponentDef(record.initialDef, newComp);
|
|
1570
1577
|
// create a snapshot which avoids the set being mutated during updates
|
|
1571
|
-
const instances = [...record];
|
|
1578
|
+
const instances = [...record.instances];
|
|
1572
1579
|
for (const instance of instances) {
|
|
1573
1580
|
const oldComp = normalizeClassComponent(instance.type);
|
|
1574
1581
|
if (!hmrDirtyComponents.has(oldComp)) {
|
|
1575
1582
|
// 1. Update existing comp definition to match new one
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
if (key !== '__file' && !(key in newComp)) {
|
|
1579
|
-
delete oldComp[key];
|
|
1580
|
-
}
|
|
1583
|
+
if (oldComp !== record.initialDef) {
|
|
1584
|
+
updateComponentDef(oldComp, newComp);
|
|
1581
1585
|
}
|
|
1582
1586
|
// 2. mark definition dirty. This forces the renderer to replace the
|
|
1583
1587
|
// component on patch.
|
|
@@ -1623,6 +1627,14 @@ var Vue = (function () {
|
|
|
1623
1627
|
}
|
|
1624
1628
|
});
|
|
1625
1629
|
}
|
|
1630
|
+
function updateComponentDef(oldComp, newComp) {
|
|
1631
|
+
extend(oldComp, newComp);
|
|
1632
|
+
for (const key in oldComp) {
|
|
1633
|
+
if (key !== '__file' && !(key in newComp)) {
|
|
1634
|
+
delete oldComp[key];
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1626
1638
|
function tryWrap(fn) {
|
|
1627
1639
|
return (id, arg) => {
|
|
1628
1640
|
try {
|
|
@@ -1638,27 +1650,52 @@ var Vue = (function () {
|
|
|
1638
1650
|
|
|
1639
1651
|
let devtools;
|
|
1640
1652
|
let buffer = [];
|
|
1653
|
+
let devtoolsNotInstalled = false;
|
|
1641
1654
|
function emit(event, ...args) {
|
|
1642
1655
|
if (devtools) {
|
|
1643
1656
|
devtools.emit(event, ...args);
|
|
1644
1657
|
}
|
|
1645
|
-
else {
|
|
1658
|
+
else if (!devtoolsNotInstalled) {
|
|
1646
1659
|
buffer.push({ event, args });
|
|
1647
1660
|
}
|
|
1648
1661
|
}
|
|
1649
1662
|
function setDevtoolsHook(hook, target) {
|
|
1663
|
+
var _a, _b;
|
|
1650
1664
|
devtools = hook;
|
|
1651
1665
|
if (devtools) {
|
|
1652
1666
|
devtools.enabled = true;
|
|
1653
1667
|
buffer.forEach(({ event, args }) => devtools.emit(event, ...args));
|
|
1654
1668
|
buffer = [];
|
|
1655
1669
|
}
|
|
1656
|
-
else
|
|
1670
|
+
else if (
|
|
1671
|
+
// handle late devtools injection - only do this if we are in an actual
|
|
1672
|
+
// browser environment to avoid the timer handle stalling test runner exit
|
|
1673
|
+
// (#4815)
|
|
1674
|
+
// eslint-disable-next-line no-restricted-globals
|
|
1675
|
+
typeof window !== 'undefined' &&
|
|
1676
|
+
// some envs mock window but not fully
|
|
1677
|
+
window.HTMLElement &&
|
|
1678
|
+
// also exclude jsdom
|
|
1679
|
+
!((_b = (_a = window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === null || _b === void 0 ? void 0 : _b.includes('jsdom'))) {
|
|
1657
1680
|
const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ =
|
|
1658
1681
|
target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []);
|
|
1659
1682
|
replay.push((newHook) => {
|
|
1660
1683
|
setDevtoolsHook(newHook, target);
|
|
1661
1684
|
});
|
|
1685
|
+
// clear buffer after 3s - the user probably doesn't have devtools installed
|
|
1686
|
+
// at all, and keeping the buffer will cause memory leaks (#4738)
|
|
1687
|
+
setTimeout(() => {
|
|
1688
|
+
if (!devtools) {
|
|
1689
|
+
target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
|
|
1690
|
+
devtoolsNotInstalled = true;
|
|
1691
|
+
buffer = [];
|
|
1692
|
+
}
|
|
1693
|
+
}, 3000);
|
|
1694
|
+
}
|
|
1695
|
+
else {
|
|
1696
|
+
// non-browser env, assume not installed
|
|
1697
|
+
devtoolsNotInstalled = true;
|
|
1698
|
+
buffer = [];
|
|
1662
1699
|
}
|
|
1663
1700
|
}
|
|
1664
1701
|
function devtoolsInitApp(app, version) {
|
|
@@ -3273,7 +3310,8 @@ var Vue = (function () {
|
|
|
3273
3310
|
const rawProps = toRaw(props);
|
|
3274
3311
|
const { mode } = rawProps;
|
|
3275
3312
|
// check mode
|
|
3276
|
-
if (mode &&
|
|
3313
|
+
if (mode &&
|
|
3314
|
+
mode !== 'in-out' && mode !== 'out-in' && mode !== 'default') {
|
|
3277
3315
|
warn$1(`invalid <transition> mode: ${mode}`);
|
|
3278
3316
|
}
|
|
3279
3317
|
// at this point children has a guaranteed length of 1.
|
|
@@ -3919,7 +3957,7 @@ var Vue = (function () {
|
|
|
3919
3957
|
}
|
|
3920
3958
|
current = current.parent;
|
|
3921
3959
|
}
|
|
3922
|
-
hook();
|
|
3960
|
+
return hook();
|
|
3923
3961
|
});
|
|
3924
3962
|
injectHook(type, wrappedHook, target);
|
|
3925
3963
|
// In addition to registering it on the target instance, we walk up the parent
|
|
@@ -5143,7 +5181,7 @@ var Vue = (function () {
|
|
|
5143
5181
|
[bar, this.y]
|
|
5144
5182
|
])
|
|
5145
5183
|
*/
|
|
5146
|
-
const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text');
|
|
5184
|
+
const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
|
|
5147
5185
|
function validateDirectiveName(name) {
|
|
5148
5186
|
if (isBuiltInDirective(name)) {
|
|
5149
5187
|
warn$1('Do not use built-in directive ids as custom directive id: ' + name);
|
|
@@ -5278,7 +5316,7 @@ var Vue = (function () {
|
|
|
5278
5316
|
return vm;
|
|
5279
5317
|
}
|
|
5280
5318
|
}
|
|
5281
|
-
Vue.version = "3.2.
|
|
5319
|
+
Vue.version = "3.2.23";
|
|
5282
5320
|
Vue.config = singletonApp.config;
|
|
5283
5321
|
Vue.use = (p, ...options) => {
|
|
5284
5322
|
if (p && isFunction(p.install)) {
|
|
@@ -6724,7 +6762,7 @@ var Vue = (function () {
|
|
|
6724
6762
|
}
|
|
6725
6763
|
};
|
|
6726
6764
|
const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, isSVG, optimized) => {
|
|
6727
|
-
// 2.x compat may pre-
|
|
6765
|
+
// 2.x compat may pre-create the component instance before actually
|
|
6728
6766
|
// mounting
|
|
6729
6767
|
const compatMountInstance = initialVNode.isCompatRoot && initialVNode.component;
|
|
6730
6768
|
const instance = compatMountInstance ||
|
|
@@ -7604,8 +7642,8 @@ var Vue = (function () {
|
|
|
7604
7642
|
*
|
|
7605
7643
|
* #2080
|
|
7606
7644
|
* Inside keyed `template` fragment static children, if a fragment is moved,
|
|
7607
|
-
* the children will always moved
|
|
7608
|
-
*
|
|
7645
|
+
* the children will always be moved. Therefore, in order to ensure correct move
|
|
7646
|
+
* position, el should be inherited from previous nodes.
|
|
7609
7647
|
*/
|
|
7610
7648
|
function traverseStaticChildren(n1, n2, shallow = false) {
|
|
7611
7649
|
const ch1 = n1.children;
|
|
@@ -8732,7 +8770,8 @@ var Vue = (function () {
|
|
|
8732
8770
|
else if (isOn(key)) {
|
|
8733
8771
|
const existing = ret[key];
|
|
8734
8772
|
const incoming = toMerge[key];
|
|
8735
|
-
if (existing !== incoming
|
|
8773
|
+
if (existing !== incoming &&
|
|
8774
|
+
!(isArray(existing) && existing.includes(incoming))) {
|
|
8736
8775
|
ret[key] = existing
|
|
8737
8776
|
? [].concat(existing, incoming)
|
|
8738
8777
|
: incoming;
|
|
@@ -9176,23 +9215,23 @@ var Vue = (function () {
|
|
|
9176
9215
|
const n = accessCache[key];
|
|
9177
9216
|
if (n !== undefined) {
|
|
9178
9217
|
switch (n) {
|
|
9179
|
-
case
|
|
9218
|
+
case 1 /* SETUP */:
|
|
9180
9219
|
return setupState[key];
|
|
9181
|
-
case
|
|
9220
|
+
case 2 /* DATA */:
|
|
9182
9221
|
return data[key];
|
|
9183
|
-
case
|
|
9222
|
+
case 4 /* CONTEXT */:
|
|
9184
9223
|
return ctx[key];
|
|
9185
|
-
case
|
|
9224
|
+
case 3 /* PROPS */:
|
|
9186
9225
|
return props[key];
|
|
9187
9226
|
// default: just fallthrough
|
|
9188
9227
|
}
|
|
9189
9228
|
}
|
|
9190
9229
|
else if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
|
|
9191
|
-
accessCache[key] =
|
|
9230
|
+
accessCache[key] = 1 /* SETUP */;
|
|
9192
9231
|
return setupState[key];
|
|
9193
9232
|
}
|
|
9194
9233
|
else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
9195
|
-
accessCache[key] =
|
|
9234
|
+
accessCache[key] = 2 /* DATA */;
|
|
9196
9235
|
return data[key];
|
|
9197
9236
|
}
|
|
9198
9237
|
else if (
|
|
@@ -9200,15 +9239,15 @@ var Vue = (function () {
|
|
|
9200
9239
|
// props
|
|
9201
9240
|
(normalizedProps = instance.propsOptions[0]) &&
|
|
9202
9241
|
hasOwn(normalizedProps, key)) {
|
|
9203
|
-
accessCache[key] =
|
|
9242
|
+
accessCache[key] = 3 /* PROPS */;
|
|
9204
9243
|
return props[key];
|
|
9205
9244
|
}
|
|
9206
9245
|
else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
|
|
9207
|
-
accessCache[key] =
|
|
9246
|
+
accessCache[key] = 4 /* CONTEXT */;
|
|
9208
9247
|
return ctx[key];
|
|
9209
9248
|
}
|
|
9210
9249
|
else if (shouldCacheAccess) {
|
|
9211
|
-
accessCache[key] =
|
|
9250
|
+
accessCache[key] = 0 /* OTHER */;
|
|
9212
9251
|
}
|
|
9213
9252
|
}
|
|
9214
9253
|
const publicGetter = publicPropertiesMap[key];
|
|
@@ -9229,7 +9268,7 @@ var Vue = (function () {
|
|
|
9229
9268
|
}
|
|
9230
9269
|
else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
|
|
9231
9270
|
// user may set custom properties to `this` that start with `$`
|
|
9232
|
-
accessCache[key] =
|
|
9271
|
+
accessCache[key] = 4 /* CONTEXT */;
|
|
9233
9272
|
return ctx[key];
|
|
9234
9273
|
}
|
|
9235
9274
|
else if (
|
|
@@ -9297,7 +9336,7 @@ var Vue = (function () {
|
|
|
9297
9336
|
},
|
|
9298
9337
|
has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) {
|
|
9299
9338
|
let normalizedProps;
|
|
9300
|
-
return (accessCache[key]
|
|
9339
|
+
return (!!accessCache[key] ||
|
|
9301
9340
|
(data !== EMPTY_OBJ && hasOwn(data, key)) ||
|
|
9302
9341
|
(setupState !== EMPTY_OBJ && hasOwn(setupState, key)) ||
|
|
9303
9342
|
((normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key)) ||
|
|
@@ -10540,15 +10579,21 @@ var Vue = (function () {
|
|
|
10540
10579
|
* only.
|
|
10541
10580
|
* @internal
|
|
10542
10581
|
*/
|
|
10543
|
-
function mergeDefaults(
|
|
10544
|
-
|
|
10545
|
-
|
|
10582
|
+
function mergeDefaults(raw, defaults) {
|
|
10583
|
+
const props = isArray(raw)
|
|
10584
|
+
? raw.reduce((normalized, p) => ((normalized[p] = {}), normalized), {})
|
|
10585
|
+
: raw;
|
|
10546
10586
|
for (const key in defaults) {
|
|
10547
|
-
const
|
|
10548
|
-
if (
|
|
10549
|
-
|
|
10587
|
+
const opt = props[key];
|
|
10588
|
+
if (opt) {
|
|
10589
|
+
if (isArray(opt) || isFunction(opt)) {
|
|
10590
|
+
props[key] = { type: opt, default: defaults[key] };
|
|
10591
|
+
}
|
|
10592
|
+
else {
|
|
10593
|
+
opt.default = defaults[key];
|
|
10594
|
+
}
|
|
10550
10595
|
}
|
|
10551
|
-
else if (
|
|
10596
|
+
else if (opt === null) {
|
|
10552
10597
|
props[key] = { default: defaults[key] };
|
|
10553
10598
|
}
|
|
10554
10599
|
else {
|
|
@@ -10557,6 +10602,23 @@ var Vue = (function () {
|
|
|
10557
10602
|
}
|
|
10558
10603
|
return props;
|
|
10559
10604
|
}
|
|
10605
|
+
/**
|
|
10606
|
+
* Used to create a proxy for the rest element when destructuring props with
|
|
10607
|
+
* defineProps().
|
|
10608
|
+
* @internal
|
|
10609
|
+
*/
|
|
10610
|
+
function createPropsRestProxy(props, excludedKeys) {
|
|
10611
|
+
const ret = {};
|
|
10612
|
+
for (const key in props) {
|
|
10613
|
+
if (!excludedKeys.includes(key)) {
|
|
10614
|
+
Object.defineProperty(ret, key, {
|
|
10615
|
+
enumerable: true,
|
|
10616
|
+
get: () => props[key]
|
|
10617
|
+
});
|
|
10618
|
+
}
|
|
10619
|
+
}
|
|
10620
|
+
return ret;
|
|
10621
|
+
}
|
|
10560
10622
|
/**
|
|
10561
10623
|
* `<script setup>` helper for persisting the current instance context over
|
|
10562
10624
|
* async/await flows.
|
|
@@ -10844,7 +10906,7 @@ var Vue = (function () {
|
|
|
10844
10906
|
}
|
|
10845
10907
|
|
|
10846
10908
|
// Core API ------------------------------------------------------------------
|
|
10847
|
-
const version = "3.2.
|
|
10909
|
+
const version = "3.2.23";
|
|
10848
10910
|
/**
|
|
10849
10911
|
* SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
|
|
10850
10912
|
* @internal
|
|
@@ -10973,16 +11035,8 @@ var Vue = (function () {
|
|
|
10973
11035
|
|
|
10974
11036
|
function patchStyle(el, prev, next) {
|
|
10975
11037
|
const style = el.style;
|
|
10976
|
-
const
|
|
10977
|
-
if (!
|
|
10978
|
-
el.removeAttribute('style');
|
|
10979
|
-
}
|
|
10980
|
-
else if (isString(next)) {
|
|
10981
|
-
if (prev !== next) {
|
|
10982
|
-
style.cssText = next;
|
|
10983
|
-
}
|
|
10984
|
-
}
|
|
10985
|
-
else {
|
|
11038
|
+
const isCssString = isString(next);
|
|
11039
|
+
if (next && !isCssString) {
|
|
10986
11040
|
for (const key in next) {
|
|
10987
11041
|
setStyle(style, key, next[key]);
|
|
10988
11042
|
}
|
|
@@ -10994,11 +11048,22 @@ var Vue = (function () {
|
|
|
10994
11048
|
}
|
|
10995
11049
|
}
|
|
10996
11050
|
}
|
|
10997
|
-
|
|
10998
|
-
|
|
10999
|
-
|
|
11000
|
-
|
|
11001
|
-
|
|
11051
|
+
else {
|
|
11052
|
+
const currentDisplay = style.display;
|
|
11053
|
+
if (isCssString) {
|
|
11054
|
+
if (prev !== next) {
|
|
11055
|
+
style.cssText = next;
|
|
11056
|
+
}
|
|
11057
|
+
}
|
|
11058
|
+
else if (prev) {
|
|
11059
|
+
el.removeAttribute('style');
|
|
11060
|
+
}
|
|
11061
|
+
// indicates that the `display` of the element is controlled by `v-show`,
|
|
11062
|
+
// so we always keep the current `display` value regardless of the `style`
|
|
11063
|
+
// value, thus handing over control to `v-show`.
|
|
11064
|
+
if ('_vod' in el) {
|
|
11065
|
+
style.display = currentDisplay;
|
|
11066
|
+
}
|
|
11002
11067
|
}
|
|
11003
11068
|
}
|
|
11004
11069
|
const importantRE = /\s*!important$/;
|
|
@@ -11108,12 +11173,19 @@ var Vue = (function () {
|
|
|
11108
11173
|
el[key] = value == null ? '' : value;
|
|
11109
11174
|
return;
|
|
11110
11175
|
}
|
|
11111
|
-
if (key === 'value' &&
|
|
11176
|
+
if (key === 'value' &&
|
|
11177
|
+
el.tagName !== 'PROGRESS' &&
|
|
11178
|
+
// custom elements may use _value internally
|
|
11179
|
+
!el.tagName.includes('-')) {
|
|
11112
11180
|
// store value as _value as well since
|
|
11113
11181
|
// non-string values will be stringified.
|
|
11114
11182
|
el._value = value;
|
|
11115
11183
|
const newValue = value == null ? '' : value;
|
|
11116
|
-
if (el.value !== newValue
|
|
11184
|
+
if (el.value !== newValue ||
|
|
11185
|
+
// #4956: always set for OPTION elements because its value falls back to
|
|
11186
|
+
// textContent if no value attribute is present. And setting .value for
|
|
11187
|
+
// OPTION has no side effect
|
|
11188
|
+
el.tagName === 'OPTION') {
|
|
11117
11189
|
el.value = newValue;
|
|
11118
11190
|
}
|
|
11119
11191
|
if (value == null) {
|
|
@@ -11381,22 +11453,11 @@ var Vue = (function () {
|
|
|
11381
11453
|
}
|
|
11382
11454
|
this.attachShadow({ mode: 'open' });
|
|
11383
11455
|
}
|
|
11384
|
-
// set initial attrs
|
|
11385
|
-
for (let i = 0; i < this.attributes.length; i++) {
|
|
11386
|
-
this._setAttr(this.attributes[i].name);
|
|
11387
|
-
}
|
|
11388
|
-
// watch future attr changes
|
|
11389
|
-
new MutationObserver(mutations => {
|
|
11390
|
-
for (const m of mutations) {
|
|
11391
|
-
this._setAttr(m.attributeName);
|
|
11392
|
-
}
|
|
11393
|
-
}).observe(this, { attributes: true });
|
|
11394
11456
|
}
|
|
11395
11457
|
connectedCallback() {
|
|
11396
11458
|
this._connected = true;
|
|
11397
11459
|
if (!this._instance) {
|
|
11398
11460
|
this._resolveDef();
|
|
11399
|
-
this._update();
|
|
11400
11461
|
}
|
|
11401
11462
|
}
|
|
11402
11463
|
disconnectedCallback() {
|
|
@@ -11415,8 +11476,18 @@ var Vue = (function () {
|
|
|
11415
11476
|
if (this._resolved) {
|
|
11416
11477
|
return;
|
|
11417
11478
|
}
|
|
11479
|
+
this._resolved = true;
|
|
11480
|
+
// set initial attrs
|
|
11481
|
+
for (let i = 0; i < this.attributes.length; i++) {
|
|
11482
|
+
this._setAttr(this.attributes[i].name);
|
|
11483
|
+
}
|
|
11484
|
+
// watch future attr changes
|
|
11485
|
+
new MutationObserver(mutations => {
|
|
11486
|
+
for (const m of mutations) {
|
|
11487
|
+
this._setAttr(m.attributeName);
|
|
11488
|
+
}
|
|
11489
|
+
}).observe(this, { attributes: true });
|
|
11418
11490
|
const resolve = (def) => {
|
|
11419
|
-
this._resolved = true;
|
|
11420
11491
|
const { props, styles } = def;
|
|
11421
11492
|
const hasOptions = !isArray(props);
|
|
11422
11493
|
const rawKeys = props ? (hasOptions ? Object.keys(props) : props) : [];
|
|
@@ -11431,14 +11502,11 @@ var Vue = (function () {
|
|
|
11431
11502
|
}
|
|
11432
11503
|
}
|
|
11433
11504
|
}
|
|
11434
|
-
|
|
11435
|
-
this._numberProps = numberProps;
|
|
11436
|
-
this._update();
|
|
11437
|
-
}
|
|
11505
|
+
this._numberProps = numberProps;
|
|
11438
11506
|
// check if there are props set pre-upgrade or connect
|
|
11439
11507
|
for (const key of Object.keys(this)) {
|
|
11440
11508
|
if (key[0] !== '_') {
|
|
11441
|
-
this._setProp(key, this[key]);
|
|
11509
|
+
this._setProp(key, this[key], true, false);
|
|
11442
11510
|
}
|
|
11443
11511
|
}
|
|
11444
11512
|
// defining getter/setters on prototype
|
|
@@ -11452,7 +11520,10 @@ var Vue = (function () {
|
|
|
11452
11520
|
}
|
|
11453
11521
|
});
|
|
11454
11522
|
}
|
|
11523
|
+
// apply CSS
|
|
11455
11524
|
this._applyStyles(styles);
|
|
11525
|
+
// initial render
|
|
11526
|
+
this._update();
|
|
11456
11527
|
};
|
|
11457
11528
|
const asyncDef = this._def.__asyncLoader;
|
|
11458
11529
|
if (asyncDef) {
|
|
@@ -11478,10 +11549,10 @@ var Vue = (function () {
|
|
|
11478
11549
|
/**
|
|
11479
11550
|
* @internal
|
|
11480
11551
|
*/
|
|
11481
|
-
_setProp(key, val, shouldReflect = true) {
|
|
11552
|
+
_setProp(key, val, shouldReflect = true, shouldUpdate = true) {
|
|
11482
11553
|
if (val !== this._props[key]) {
|
|
11483
11554
|
this._props[key] = val;
|
|
11484
|
-
if (this._instance) {
|
|
11555
|
+
if (shouldUpdate && this._instance) {
|
|
11485
11556
|
this._update();
|
|
11486
11557
|
}
|
|
11487
11558
|
// reflect
|
|
@@ -12665,6 +12736,7 @@ var Vue = (function () {
|
|
|
12665
12736
|
defineExpose: defineExpose,
|
|
12666
12737
|
withDefaults: withDefaults,
|
|
12667
12738
|
mergeDefaults: mergeDefaults,
|
|
12739
|
+
createPropsRestProxy: createPropsRestProxy,
|
|
12668
12740
|
withAsyncContext: withAsyncContext,
|
|
12669
12741
|
getCurrentInstance: getCurrentInstance,
|
|
12670
12742
|
h: h,
|
|
@@ -13172,7 +13244,7 @@ var Vue = (function () {
|
|
|
13172
13244
|
const isMemberExpression = isMemberExpressionBrowser
|
|
13173
13245
|
;
|
|
13174
13246
|
function getInnerRange(loc, offset, length) {
|
|
13175
|
-
const source = loc.source.
|
|
13247
|
+
const source = loc.source.slice(offset, offset + length);
|
|
13176
13248
|
const newLoc = {
|
|
13177
13249
|
source,
|
|
13178
13250
|
start: advancePositionWithClone(loc.start, loc.source, offset),
|
|
@@ -13886,6 +13958,7 @@ var Vue = (function () {
|
|
|
13886
13958
|
}
|
|
13887
13959
|
if (hasIf && hasFor) {
|
|
13888
13960
|
warnDeprecation$1("COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */, context, getSelection(context, start));
|
|
13961
|
+
break;
|
|
13889
13962
|
}
|
|
13890
13963
|
}
|
|
13891
13964
|
}
|
|
@@ -14043,10 +14116,10 @@ var Vue = (function () {
|
|
|
14043
14116
|
isStatic = false;
|
|
14044
14117
|
if (!content.endsWith(']')) {
|
|
14045
14118
|
emitError(context, 27 /* X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END */);
|
|
14046
|
-
content = content.
|
|
14119
|
+
content = content.slice(1);
|
|
14047
14120
|
}
|
|
14048
14121
|
else {
|
|
14049
|
-
content = content.
|
|
14122
|
+
content = content.slice(1, content.length - 1);
|
|
14050
14123
|
}
|
|
14051
14124
|
}
|
|
14052
14125
|
else if (isSlot) {
|
|
@@ -14072,7 +14145,7 @@ var Vue = (function () {
|
|
|
14072
14145
|
valueLoc.end = advancePositionWithClone(valueLoc.start, value.content);
|
|
14073
14146
|
valueLoc.source = valueLoc.source.slice(1, -1);
|
|
14074
14147
|
}
|
|
14075
|
-
const modifiers = match[3] ? match[3].
|
|
14148
|
+
const modifiers = match[3] ? match[3].slice(1).split('.') : [];
|
|
14076
14149
|
if (isPropShorthand)
|
|
14077
14150
|
modifiers.push('prop');
|
|
14078
14151
|
// 2.x compat v-bind:foo.sync -> v-model:foo
|
|
@@ -14293,7 +14366,7 @@ var Vue = (function () {
|
|
|
14293
14366
|
}
|
|
14294
14367
|
function startsWithEndTagOpen(source, tag) {
|
|
14295
14368
|
return (startsWith(source, '</') &&
|
|
14296
|
-
source.
|
|
14369
|
+
source.slice(2, 2 + tag.length).toLowerCase() === tag.toLowerCase() &&
|
|
14297
14370
|
/[\t\r\n\f />]/.test(source[2 + tag.length] || '>'));
|
|
14298
14371
|
}
|
|
14299
14372
|
|
|
@@ -16753,7 +16826,7 @@ var Vue = (function () {
|
|
|
16753
16826
|
return propsNamesString + `]`;
|
|
16754
16827
|
}
|
|
16755
16828
|
function isComponentTag(tag) {
|
|
16756
|
-
return tag
|
|
16829
|
+
return tag === 'component' || tag === 'Component';
|
|
16757
16830
|
}
|
|
16758
16831
|
|
|
16759
16832
|
const transformSlotOutlet = (node, context) => {
|