@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
|
@@ -455,7 +455,7 @@ const targetMap = new WeakMap();
|
|
|
455
455
|
let effectTrackDepth = 0;
|
|
456
456
|
let trackOpBit = 1;
|
|
457
457
|
/**
|
|
458
|
-
* The bitwise track markers support at most 30 levels
|
|
458
|
+
* The bitwise track markers support at most 30 levels of recursion.
|
|
459
459
|
* This value is chosen to enable modern JS engines to use a SMI on all platforms.
|
|
460
460
|
* When recursion depth is greater, fall back to using a full cleanup.
|
|
461
461
|
*/
|
|
@@ -776,7 +776,7 @@ const shallowSet = /*#__PURE__*/ createSetter(true);
|
|
|
776
776
|
function createSetter(shallow = false) {
|
|
777
777
|
return function set(target, key, value, receiver) {
|
|
778
778
|
let oldValue = target[key];
|
|
779
|
-
if (!shallow) {
|
|
779
|
+
if (!shallow && !isReadonly(value)) {
|
|
780
780
|
value = toRaw(value);
|
|
781
781
|
oldValue = toRaw(oldValue);
|
|
782
782
|
if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
|
|
@@ -1449,19 +1449,22 @@ function registerHMR(instance) {
|
|
|
1449
1449
|
const id = instance.type.__hmrId;
|
|
1450
1450
|
let record = map.get(id);
|
|
1451
1451
|
if (!record) {
|
|
1452
|
-
createRecord(id);
|
|
1452
|
+
createRecord(id, instance.type);
|
|
1453
1453
|
record = map.get(id);
|
|
1454
1454
|
}
|
|
1455
|
-
record.add(instance);
|
|
1455
|
+
record.instances.add(instance);
|
|
1456
1456
|
}
|
|
1457
1457
|
function unregisterHMR(instance) {
|
|
1458
|
-
map.get(instance.type.__hmrId).delete(instance);
|
|
1458
|
+
map.get(instance.type.__hmrId).instances.delete(instance);
|
|
1459
1459
|
}
|
|
1460
|
-
function createRecord(id) {
|
|
1460
|
+
function createRecord(id, initialDef) {
|
|
1461
1461
|
if (map.has(id)) {
|
|
1462
1462
|
return false;
|
|
1463
1463
|
}
|
|
1464
|
-
map.set(id,
|
|
1464
|
+
map.set(id, {
|
|
1465
|
+
initialDef: normalizeClassComponent(initialDef),
|
|
1466
|
+
instances: new Set()
|
|
1467
|
+
});
|
|
1465
1468
|
return true;
|
|
1466
1469
|
}
|
|
1467
1470
|
function normalizeClassComponent(component) {
|
|
@@ -1472,7 +1475,9 @@ function rerender(id, newRender) {
|
|
|
1472
1475
|
if (!record) {
|
|
1473
1476
|
return;
|
|
1474
1477
|
}
|
|
1475
|
-
|
|
1478
|
+
// update initial record (for not-yet-rendered component)
|
|
1479
|
+
record.initialDef.render = newRender;
|
|
1480
|
+
[...record.instances].forEach(instance => {
|
|
1476
1481
|
if (newRender) {
|
|
1477
1482
|
instance.render = newRender;
|
|
1478
1483
|
normalizeClassComponent(instance.type).render = newRender;
|
|
@@ -1489,17 +1494,16 @@ function reload(id, newComp) {
|
|
|
1489
1494
|
if (!record)
|
|
1490
1495
|
return;
|
|
1491
1496
|
newComp = normalizeClassComponent(newComp);
|
|
1497
|
+
// update initial def (for not-yet-rendered components)
|
|
1498
|
+
updateComponentDef(record.initialDef, newComp);
|
|
1492
1499
|
// create a snapshot which avoids the set being mutated during updates
|
|
1493
|
-
const instances = [...record];
|
|
1500
|
+
const instances = [...record.instances];
|
|
1494
1501
|
for (const instance of instances) {
|
|
1495
1502
|
const oldComp = normalizeClassComponent(instance.type);
|
|
1496
1503
|
if (!hmrDirtyComponents.has(oldComp)) {
|
|
1497
1504
|
// 1. Update existing comp definition to match new one
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
if (key !== '__file' && !(key in newComp)) {
|
|
1501
|
-
delete oldComp[key];
|
|
1502
|
-
}
|
|
1505
|
+
if (oldComp !== record.initialDef) {
|
|
1506
|
+
updateComponentDef(oldComp, newComp);
|
|
1503
1507
|
}
|
|
1504
1508
|
// 2. mark definition dirty. This forces the renderer to replace the
|
|
1505
1509
|
// component on patch.
|
|
@@ -1545,6 +1549,14 @@ function reload(id, newComp) {
|
|
|
1545
1549
|
}
|
|
1546
1550
|
});
|
|
1547
1551
|
}
|
|
1552
|
+
function updateComponentDef(oldComp, newComp) {
|
|
1553
|
+
extend(oldComp, newComp);
|
|
1554
|
+
for (const key in oldComp) {
|
|
1555
|
+
if (key !== '__file' && !(key in newComp)) {
|
|
1556
|
+
delete oldComp[key];
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1559
|
+
}
|
|
1548
1560
|
function tryWrap(fn) {
|
|
1549
1561
|
return (id, arg) => {
|
|
1550
1562
|
try {
|
|
@@ -1560,27 +1572,52 @@ function tryWrap(fn) {
|
|
|
1560
1572
|
|
|
1561
1573
|
let devtools;
|
|
1562
1574
|
let buffer = [];
|
|
1575
|
+
let devtoolsNotInstalled = false;
|
|
1563
1576
|
function emit(event, ...args) {
|
|
1564
1577
|
if (devtools) {
|
|
1565
1578
|
devtools.emit(event, ...args);
|
|
1566
1579
|
}
|
|
1567
|
-
else {
|
|
1580
|
+
else if (!devtoolsNotInstalled) {
|
|
1568
1581
|
buffer.push({ event, args });
|
|
1569
1582
|
}
|
|
1570
1583
|
}
|
|
1571
1584
|
function setDevtoolsHook(hook, target) {
|
|
1585
|
+
var _a, _b;
|
|
1572
1586
|
devtools = hook;
|
|
1573
1587
|
if (devtools) {
|
|
1574
1588
|
devtools.enabled = true;
|
|
1575
1589
|
buffer.forEach(({ event, args }) => devtools.emit(event, ...args));
|
|
1576
1590
|
buffer = [];
|
|
1577
1591
|
}
|
|
1578
|
-
else
|
|
1592
|
+
else if (
|
|
1593
|
+
// handle late devtools injection - only do this if we are in an actual
|
|
1594
|
+
// browser environment to avoid the timer handle stalling test runner exit
|
|
1595
|
+
// (#4815)
|
|
1596
|
+
// eslint-disable-next-line no-restricted-globals
|
|
1597
|
+
typeof window !== 'undefined' &&
|
|
1598
|
+
// some envs mock window but not fully
|
|
1599
|
+
window.HTMLElement &&
|
|
1600
|
+
// also exclude jsdom
|
|
1601
|
+
!((_b = (_a = window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === null || _b === void 0 ? void 0 : _b.includes('jsdom'))) {
|
|
1579
1602
|
const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ =
|
|
1580
1603
|
target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []);
|
|
1581
1604
|
replay.push((newHook) => {
|
|
1582
1605
|
setDevtoolsHook(newHook, target);
|
|
1583
1606
|
});
|
|
1607
|
+
// clear buffer after 3s - the user probably doesn't have devtools installed
|
|
1608
|
+
// at all, and keeping the buffer will cause memory leaks (#4738)
|
|
1609
|
+
setTimeout(() => {
|
|
1610
|
+
if (!devtools) {
|
|
1611
|
+
target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
|
|
1612
|
+
devtoolsNotInstalled = true;
|
|
1613
|
+
buffer = [];
|
|
1614
|
+
}
|
|
1615
|
+
}, 3000);
|
|
1616
|
+
}
|
|
1617
|
+
else {
|
|
1618
|
+
// non-browser env, assume not installed
|
|
1619
|
+
devtoolsNotInstalled = true;
|
|
1620
|
+
buffer = [];
|
|
1584
1621
|
}
|
|
1585
1622
|
}
|
|
1586
1623
|
function devtoolsInitApp(app, version) {
|
|
@@ -3195,7 +3232,8 @@ const BaseTransitionImpl = {
|
|
|
3195
3232
|
const rawProps = toRaw(props);
|
|
3196
3233
|
const { mode } = rawProps;
|
|
3197
3234
|
// check mode
|
|
3198
|
-
if (mode &&
|
|
3235
|
+
if (mode &&
|
|
3236
|
+
mode !== 'in-out' && mode !== 'out-in' && mode !== 'default') {
|
|
3199
3237
|
warn$1(`invalid <transition> mode: ${mode}`);
|
|
3200
3238
|
}
|
|
3201
3239
|
// at this point children has a guaranteed length of 1.
|
|
@@ -3841,7 +3879,7 @@ function registerKeepAliveHook(hook, type, target = currentInstance) {
|
|
|
3841
3879
|
}
|
|
3842
3880
|
current = current.parent;
|
|
3843
3881
|
}
|
|
3844
|
-
hook();
|
|
3882
|
+
return hook();
|
|
3845
3883
|
});
|
|
3846
3884
|
injectHook(type, wrappedHook, target);
|
|
3847
3885
|
// In addition to registering it on the target instance, we walk up the parent
|
|
@@ -5065,7 +5103,7 @@ return withDirectives(h(comp), [
|
|
|
5065
5103
|
[bar, this.y]
|
|
5066
5104
|
])
|
|
5067
5105
|
*/
|
|
5068
|
-
const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text');
|
|
5106
|
+
const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
|
|
5069
5107
|
function validateDirectiveName(name) {
|
|
5070
5108
|
if (isBuiltInDirective(name)) {
|
|
5071
5109
|
warn$1('Do not use built-in directive ids as custom directive id: ' + name);
|
|
@@ -5200,7 +5238,7 @@ function createCompatVue(createApp, createSingletonApp) {
|
|
|
5200
5238
|
return vm;
|
|
5201
5239
|
}
|
|
5202
5240
|
}
|
|
5203
|
-
Vue.version = "3.2.
|
|
5241
|
+
Vue.version = "3.2.23";
|
|
5204
5242
|
Vue.config = singletonApp.config;
|
|
5205
5243
|
Vue.use = (p, ...options) => {
|
|
5206
5244
|
if (p && isFunction(p.install)) {
|
|
@@ -6646,7 +6684,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6646
6684
|
}
|
|
6647
6685
|
};
|
|
6648
6686
|
const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, isSVG, optimized) => {
|
|
6649
|
-
// 2.x compat may pre-
|
|
6687
|
+
// 2.x compat may pre-create the component instance before actually
|
|
6650
6688
|
// mounting
|
|
6651
6689
|
const compatMountInstance = initialVNode.isCompatRoot && initialVNode.component;
|
|
6652
6690
|
const instance = compatMountInstance ||
|
|
@@ -7526,8 +7564,8 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
|
7526
7564
|
*
|
|
7527
7565
|
* #2080
|
|
7528
7566
|
* Inside keyed `template` fragment static children, if a fragment is moved,
|
|
7529
|
-
* the children will always moved
|
|
7530
|
-
*
|
|
7567
|
+
* the children will always be moved. Therefore, in order to ensure correct move
|
|
7568
|
+
* position, el should be inherited from previous nodes.
|
|
7531
7569
|
*/
|
|
7532
7570
|
function traverseStaticChildren(n1, n2, shallow = false) {
|
|
7533
7571
|
const ch1 = n1.children;
|
|
@@ -8654,7 +8692,8 @@ function mergeProps(...args) {
|
|
|
8654
8692
|
else if (isOn(key)) {
|
|
8655
8693
|
const existing = ret[key];
|
|
8656
8694
|
const incoming = toMerge[key];
|
|
8657
|
-
if (existing !== incoming
|
|
8695
|
+
if (existing !== incoming &&
|
|
8696
|
+
!(isArray(existing) && existing.includes(incoming))) {
|
|
8658
8697
|
ret[key] = existing
|
|
8659
8698
|
? [].concat(existing, incoming)
|
|
8660
8699
|
: incoming;
|
|
@@ -9098,23 +9137,23 @@ const PublicInstanceProxyHandlers = {
|
|
|
9098
9137
|
const n = accessCache[key];
|
|
9099
9138
|
if (n !== undefined) {
|
|
9100
9139
|
switch (n) {
|
|
9101
|
-
case
|
|
9140
|
+
case 1 /* SETUP */:
|
|
9102
9141
|
return setupState[key];
|
|
9103
|
-
case
|
|
9142
|
+
case 2 /* DATA */:
|
|
9104
9143
|
return data[key];
|
|
9105
|
-
case
|
|
9144
|
+
case 4 /* CONTEXT */:
|
|
9106
9145
|
return ctx[key];
|
|
9107
|
-
case
|
|
9146
|
+
case 3 /* PROPS */:
|
|
9108
9147
|
return props[key];
|
|
9109
9148
|
// default: just fallthrough
|
|
9110
9149
|
}
|
|
9111
9150
|
}
|
|
9112
9151
|
else if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
|
|
9113
|
-
accessCache[key] =
|
|
9152
|
+
accessCache[key] = 1 /* SETUP */;
|
|
9114
9153
|
return setupState[key];
|
|
9115
9154
|
}
|
|
9116
9155
|
else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
9117
|
-
accessCache[key] =
|
|
9156
|
+
accessCache[key] = 2 /* DATA */;
|
|
9118
9157
|
return data[key];
|
|
9119
9158
|
}
|
|
9120
9159
|
else if (
|
|
@@ -9122,15 +9161,15 @@ const PublicInstanceProxyHandlers = {
|
|
|
9122
9161
|
// props
|
|
9123
9162
|
(normalizedProps = instance.propsOptions[0]) &&
|
|
9124
9163
|
hasOwn(normalizedProps, key)) {
|
|
9125
|
-
accessCache[key] =
|
|
9164
|
+
accessCache[key] = 3 /* PROPS */;
|
|
9126
9165
|
return props[key];
|
|
9127
9166
|
}
|
|
9128
9167
|
else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
|
|
9129
|
-
accessCache[key] =
|
|
9168
|
+
accessCache[key] = 4 /* CONTEXT */;
|
|
9130
9169
|
return ctx[key];
|
|
9131
9170
|
}
|
|
9132
9171
|
else if (shouldCacheAccess) {
|
|
9133
|
-
accessCache[key] =
|
|
9172
|
+
accessCache[key] = 0 /* OTHER */;
|
|
9134
9173
|
}
|
|
9135
9174
|
}
|
|
9136
9175
|
const publicGetter = publicPropertiesMap[key];
|
|
@@ -9151,7 +9190,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
9151
9190
|
}
|
|
9152
9191
|
else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
|
|
9153
9192
|
// user may set custom properties to `this` that start with `$`
|
|
9154
|
-
accessCache[key] =
|
|
9193
|
+
accessCache[key] = 4 /* CONTEXT */;
|
|
9155
9194
|
return ctx[key];
|
|
9156
9195
|
}
|
|
9157
9196
|
else if (
|
|
@@ -9219,7 +9258,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
9219
9258
|
},
|
|
9220
9259
|
has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) {
|
|
9221
9260
|
let normalizedProps;
|
|
9222
|
-
return (accessCache[key]
|
|
9261
|
+
return (!!accessCache[key] ||
|
|
9223
9262
|
(data !== EMPTY_OBJ && hasOwn(data, key)) ||
|
|
9224
9263
|
(setupState !== EMPTY_OBJ && hasOwn(setupState, key)) ||
|
|
9225
9264
|
((normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key)) ||
|
|
@@ -10462,15 +10501,21 @@ function getContext() {
|
|
|
10462
10501
|
* only.
|
|
10463
10502
|
* @internal
|
|
10464
10503
|
*/
|
|
10465
|
-
function mergeDefaults(
|
|
10466
|
-
|
|
10467
|
-
|
|
10504
|
+
function mergeDefaults(raw, defaults) {
|
|
10505
|
+
const props = isArray(raw)
|
|
10506
|
+
? raw.reduce((normalized, p) => ((normalized[p] = {}), normalized), {})
|
|
10507
|
+
: raw;
|
|
10468
10508
|
for (const key in defaults) {
|
|
10469
|
-
const
|
|
10470
|
-
if (
|
|
10471
|
-
|
|
10509
|
+
const opt = props[key];
|
|
10510
|
+
if (opt) {
|
|
10511
|
+
if (isArray(opt) || isFunction(opt)) {
|
|
10512
|
+
props[key] = { type: opt, default: defaults[key] };
|
|
10513
|
+
}
|
|
10514
|
+
else {
|
|
10515
|
+
opt.default = defaults[key];
|
|
10516
|
+
}
|
|
10472
10517
|
}
|
|
10473
|
-
else if (
|
|
10518
|
+
else if (opt === null) {
|
|
10474
10519
|
props[key] = { default: defaults[key] };
|
|
10475
10520
|
}
|
|
10476
10521
|
else {
|
|
@@ -10479,6 +10524,23 @@ props, defaults) {
|
|
|
10479
10524
|
}
|
|
10480
10525
|
return props;
|
|
10481
10526
|
}
|
|
10527
|
+
/**
|
|
10528
|
+
* Used to create a proxy for the rest element when destructuring props with
|
|
10529
|
+
* defineProps().
|
|
10530
|
+
* @internal
|
|
10531
|
+
*/
|
|
10532
|
+
function createPropsRestProxy(props, excludedKeys) {
|
|
10533
|
+
const ret = {};
|
|
10534
|
+
for (const key in props) {
|
|
10535
|
+
if (!excludedKeys.includes(key)) {
|
|
10536
|
+
Object.defineProperty(ret, key, {
|
|
10537
|
+
enumerable: true,
|
|
10538
|
+
get: () => props[key]
|
|
10539
|
+
});
|
|
10540
|
+
}
|
|
10541
|
+
}
|
|
10542
|
+
return ret;
|
|
10543
|
+
}
|
|
10482
10544
|
/**
|
|
10483
10545
|
* `<script setup>` helper for persisting the current instance context over
|
|
10484
10546
|
* async/await flows.
|
|
@@ -10771,7 +10833,7 @@ function isMemoSame(cached, memo) {
|
|
|
10771
10833
|
}
|
|
10772
10834
|
|
|
10773
10835
|
// Core API ------------------------------------------------------------------
|
|
10774
|
-
const version = "3.2.
|
|
10836
|
+
const version = "3.2.23";
|
|
10775
10837
|
/**
|
|
10776
10838
|
* SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
|
|
10777
10839
|
* @internal
|
|
@@ -10900,16 +10962,8 @@ function patchClass(el, value, isSVG) {
|
|
|
10900
10962
|
|
|
10901
10963
|
function patchStyle(el, prev, next) {
|
|
10902
10964
|
const style = el.style;
|
|
10903
|
-
const
|
|
10904
|
-
if (!
|
|
10905
|
-
el.removeAttribute('style');
|
|
10906
|
-
}
|
|
10907
|
-
else if (isString(next)) {
|
|
10908
|
-
if (prev !== next) {
|
|
10909
|
-
style.cssText = next;
|
|
10910
|
-
}
|
|
10911
|
-
}
|
|
10912
|
-
else {
|
|
10965
|
+
const isCssString = isString(next);
|
|
10966
|
+
if (next && !isCssString) {
|
|
10913
10967
|
for (const key in next) {
|
|
10914
10968
|
setStyle(style, key, next[key]);
|
|
10915
10969
|
}
|
|
@@ -10921,11 +10975,22 @@ function patchStyle(el, prev, next) {
|
|
|
10921
10975
|
}
|
|
10922
10976
|
}
|
|
10923
10977
|
}
|
|
10924
|
-
|
|
10925
|
-
|
|
10926
|
-
|
|
10927
|
-
|
|
10928
|
-
|
|
10978
|
+
else {
|
|
10979
|
+
const currentDisplay = style.display;
|
|
10980
|
+
if (isCssString) {
|
|
10981
|
+
if (prev !== next) {
|
|
10982
|
+
style.cssText = next;
|
|
10983
|
+
}
|
|
10984
|
+
}
|
|
10985
|
+
else if (prev) {
|
|
10986
|
+
el.removeAttribute('style');
|
|
10987
|
+
}
|
|
10988
|
+
// indicates that the `display` of the element is controlled by `v-show`,
|
|
10989
|
+
// so we always keep the current `display` value regardless of the `style`
|
|
10990
|
+
// value, thus handing over control to `v-show`.
|
|
10991
|
+
if ('_vod' in el) {
|
|
10992
|
+
style.display = currentDisplay;
|
|
10993
|
+
}
|
|
10929
10994
|
}
|
|
10930
10995
|
}
|
|
10931
10996
|
const importantRE = /\s*!important$/;
|
|
@@ -11035,12 +11100,19 @@ prevChildren, parentComponent, parentSuspense, unmountChildren) {
|
|
|
11035
11100
|
el[key] = value == null ? '' : value;
|
|
11036
11101
|
return;
|
|
11037
11102
|
}
|
|
11038
|
-
if (key === 'value' &&
|
|
11103
|
+
if (key === 'value' &&
|
|
11104
|
+
el.tagName !== 'PROGRESS' &&
|
|
11105
|
+
// custom elements may use _value internally
|
|
11106
|
+
!el.tagName.includes('-')) {
|
|
11039
11107
|
// store value as _value as well since
|
|
11040
11108
|
// non-string values will be stringified.
|
|
11041
11109
|
el._value = value;
|
|
11042
11110
|
const newValue = value == null ? '' : value;
|
|
11043
|
-
if (el.value !== newValue
|
|
11111
|
+
if (el.value !== newValue ||
|
|
11112
|
+
// #4956: always set for OPTION elements because its value falls back to
|
|
11113
|
+
// textContent if no value attribute is present. And setting .value for
|
|
11114
|
+
// OPTION has no side effect
|
|
11115
|
+
el.tagName === 'OPTION') {
|
|
11044
11116
|
el.value = newValue;
|
|
11045
11117
|
}
|
|
11046
11118
|
if (value == null) {
|
|
@@ -11308,22 +11380,11 @@ class VueElement extends BaseClass {
|
|
|
11308
11380
|
}
|
|
11309
11381
|
this.attachShadow({ mode: 'open' });
|
|
11310
11382
|
}
|
|
11311
|
-
// set initial attrs
|
|
11312
|
-
for (let i = 0; i < this.attributes.length; i++) {
|
|
11313
|
-
this._setAttr(this.attributes[i].name);
|
|
11314
|
-
}
|
|
11315
|
-
// watch future attr changes
|
|
11316
|
-
new MutationObserver(mutations => {
|
|
11317
|
-
for (const m of mutations) {
|
|
11318
|
-
this._setAttr(m.attributeName);
|
|
11319
|
-
}
|
|
11320
|
-
}).observe(this, { attributes: true });
|
|
11321
11383
|
}
|
|
11322
11384
|
connectedCallback() {
|
|
11323
11385
|
this._connected = true;
|
|
11324
11386
|
if (!this._instance) {
|
|
11325
11387
|
this._resolveDef();
|
|
11326
|
-
this._update();
|
|
11327
11388
|
}
|
|
11328
11389
|
}
|
|
11329
11390
|
disconnectedCallback() {
|
|
@@ -11342,8 +11403,18 @@ class VueElement extends BaseClass {
|
|
|
11342
11403
|
if (this._resolved) {
|
|
11343
11404
|
return;
|
|
11344
11405
|
}
|
|
11406
|
+
this._resolved = true;
|
|
11407
|
+
// set initial attrs
|
|
11408
|
+
for (let i = 0; i < this.attributes.length; i++) {
|
|
11409
|
+
this._setAttr(this.attributes[i].name);
|
|
11410
|
+
}
|
|
11411
|
+
// watch future attr changes
|
|
11412
|
+
new MutationObserver(mutations => {
|
|
11413
|
+
for (const m of mutations) {
|
|
11414
|
+
this._setAttr(m.attributeName);
|
|
11415
|
+
}
|
|
11416
|
+
}).observe(this, { attributes: true });
|
|
11345
11417
|
const resolve = (def) => {
|
|
11346
|
-
this._resolved = true;
|
|
11347
11418
|
const { props, styles } = def;
|
|
11348
11419
|
const hasOptions = !isArray(props);
|
|
11349
11420
|
const rawKeys = props ? (hasOptions ? Object.keys(props) : props) : [];
|
|
@@ -11358,14 +11429,11 @@ class VueElement extends BaseClass {
|
|
|
11358
11429
|
}
|
|
11359
11430
|
}
|
|
11360
11431
|
}
|
|
11361
|
-
|
|
11362
|
-
this._numberProps = numberProps;
|
|
11363
|
-
this._update();
|
|
11364
|
-
}
|
|
11432
|
+
this._numberProps = numberProps;
|
|
11365
11433
|
// check if there are props set pre-upgrade or connect
|
|
11366
11434
|
for (const key of Object.keys(this)) {
|
|
11367
11435
|
if (key[0] !== '_') {
|
|
11368
|
-
this._setProp(key, this[key]);
|
|
11436
|
+
this._setProp(key, this[key], true, false);
|
|
11369
11437
|
}
|
|
11370
11438
|
}
|
|
11371
11439
|
// defining getter/setters on prototype
|
|
@@ -11379,7 +11447,10 @@ class VueElement extends BaseClass {
|
|
|
11379
11447
|
}
|
|
11380
11448
|
});
|
|
11381
11449
|
}
|
|
11450
|
+
// apply CSS
|
|
11382
11451
|
this._applyStyles(styles);
|
|
11452
|
+
// initial render
|
|
11453
|
+
this._update();
|
|
11383
11454
|
};
|
|
11384
11455
|
const asyncDef = this._def.__asyncLoader;
|
|
11385
11456
|
if (asyncDef) {
|
|
@@ -11405,10 +11476,10 @@ class VueElement extends BaseClass {
|
|
|
11405
11476
|
/**
|
|
11406
11477
|
* @internal
|
|
11407
11478
|
*/
|
|
11408
|
-
_setProp(key, val, shouldReflect = true) {
|
|
11479
|
+
_setProp(key, val, shouldReflect = true, shouldUpdate = true) {
|
|
11409
11480
|
if (val !== this._props[key]) {
|
|
11410
11481
|
this._props[key] = val;
|
|
11411
|
-
if (this._instance) {
|
|
11482
|
+
if (shouldUpdate && this._instance) {
|
|
11412
11483
|
this._update();
|
|
11413
11484
|
}
|
|
11414
11485
|
// reflect
|
|
@@ -12604,6 +12675,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
12604
12675
|
defineExpose: defineExpose,
|
|
12605
12676
|
withDefaults: withDefaults,
|
|
12606
12677
|
mergeDefaults: mergeDefaults,
|
|
12678
|
+
createPropsRestProxy: createPropsRestProxy,
|
|
12607
12679
|
withAsyncContext: withAsyncContext,
|
|
12608
12680
|
getCurrentInstance: getCurrentInstance,
|
|
12609
12681
|
h: h,
|
|
@@ -12724,4 +12796,4 @@ Vue.compile = (() => {
|
|
|
12724
12796
|
const { configureCompat: configureCompat$1 } = Vue;
|
|
12725
12797
|
|
|
12726
12798
|
export default Vue;
|
|
12727
|
-
export { BaseTransition, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, configureCompat$1 as configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineProps, defineSSRCustomElement, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isVNode, markRaw, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter$1 as resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn$1 as warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|
|
12799
|
+
export { BaseTransition, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, configureCompat$1 as configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineProps, defineSSRCustomElement, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isVNode, markRaw, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter$1 as resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn$1 as warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|