@vue/compat 3.5.39 → 3.5.41
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 -70
- package/dist/vue.cjs.prod.js +172 -68
- package/dist/vue.esm-browser.js +200 -69
- package/dist/vue.esm-browser.prod.js +9 -8
- package/dist/vue.esm-bundler.js +200 -69
- package/dist/vue.global.js +200 -69
- package/dist/vue.global.prod.js +9 -8
- package/dist/vue.runtime.esm-browser.js +143 -54
- package/dist/vue.runtime.esm-browser.prod.js +4 -3
- package/dist/vue.runtime.esm-bundler.js +143 -54
- package/dist/vue.runtime.global.js +143 -54
- package/dist/vue.runtime.global.prod.js +4 -3
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.
|
|
2
|
+
* @vue/compat v3.5.41
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -194,7 +194,7 @@ const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
|
|
|
194
194
|
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
195
195
|
const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
|
|
196
196
|
const isBooleanAttr = /* @__PURE__ */ makeMap(
|
|
197
|
-
specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,
|
|
197
|
+
specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
|
|
198
198
|
);
|
|
199
199
|
function includeBooleanAttr(value) {
|
|
200
200
|
return !!value || value === "";
|
|
@@ -376,8 +376,9 @@ class EffectScope {
|
|
|
376
376
|
this._isPaused = true;
|
|
377
377
|
let i, l;
|
|
378
378
|
if (this.scopes) {
|
|
379
|
-
|
|
380
|
-
|
|
379
|
+
const scopes = this.scopes.slice();
|
|
380
|
+
for (i = 0, l = scopes.length; i < l; i++) {
|
|
381
|
+
scopes[i].pause();
|
|
381
382
|
}
|
|
382
383
|
}
|
|
383
384
|
for (i = 0, l = this.effects.length; i < l; i++) {
|
|
@@ -394,12 +395,14 @@ class EffectScope {
|
|
|
394
395
|
this._isPaused = false;
|
|
395
396
|
let i, l;
|
|
396
397
|
if (this.scopes) {
|
|
397
|
-
|
|
398
|
-
|
|
398
|
+
const scopes = this.scopes.slice();
|
|
399
|
+
for (i = 0, l = scopes.length; i < l; i++) {
|
|
400
|
+
scopes[i].resume();
|
|
399
401
|
}
|
|
400
402
|
}
|
|
401
|
-
|
|
402
|
-
|
|
403
|
+
const effects = this.effects.slice();
|
|
404
|
+
for (i = 0, l = effects.length; i < l; i++) {
|
|
405
|
+
effects[i].resume();
|
|
403
406
|
}
|
|
404
407
|
}
|
|
405
408
|
}
|
|
@@ -461,8 +464,9 @@ class EffectScope {
|
|
|
461
464
|
}
|
|
462
465
|
this.cleanups.length = 0;
|
|
463
466
|
if (this.scopes) {
|
|
464
|
-
|
|
465
|
-
|
|
467
|
+
const scopes = this.scopes.slice();
|
|
468
|
+
for (i = 0, l = scopes.length; i < l; i++) {
|
|
469
|
+
scopes[i].stop(true);
|
|
466
470
|
}
|
|
467
471
|
this.scopes.length = 0;
|
|
468
472
|
}
|
|
@@ -2608,7 +2612,9 @@ function queuePostFlushCb(cb) {
|
|
|
2608
2612
|
cb.flags |= 1;
|
|
2609
2613
|
}
|
|
2610
2614
|
} else {
|
|
2611
|
-
|
|
2615
|
+
for (let i = 0; i < cb.length; i++) {
|
|
2616
|
+
pendingPostFlushCbs.push(cb[i]);
|
|
2617
|
+
}
|
|
2612
2618
|
}
|
|
2613
2619
|
queueFlush();
|
|
2614
2620
|
}
|
|
@@ -2644,7 +2650,9 @@ function flushPostFlushCbs(seen) {
|
|
|
2644
2650
|
);
|
|
2645
2651
|
pendingPostFlushCbs.length = 0;
|
|
2646
2652
|
if (activePostFlushCbs) {
|
|
2647
|
-
|
|
2653
|
+
for (let i = 0; i < deduped.length; i++) {
|
|
2654
|
+
activePostFlushCbs.push(deduped[i]);
|
|
2655
|
+
}
|
|
2648
2656
|
return;
|
|
2649
2657
|
}
|
|
2650
2658
|
activePostFlushCbs = deduped;
|
|
@@ -3402,10 +3410,12 @@ function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
|
|
|
3402
3410
|
setBlockTracking(-1);
|
|
3403
3411
|
}
|
|
3404
3412
|
const prevInstance = setCurrentRenderingInstance(ctx);
|
|
3413
|
+
const prevStackSize = blockStack.length;
|
|
3405
3414
|
let res;
|
|
3406
3415
|
try {
|
|
3407
3416
|
res = fn(...args);
|
|
3408
3417
|
} finally {
|
|
3418
|
+
for (let i = blockStack.length; i > prevStackSize; i--) closeBlock();
|
|
3409
3419
|
setCurrentRenderingInstance(prevInstance);
|
|
3410
3420
|
if (renderFnWithContext._d) {
|
|
3411
3421
|
setBlockTracking(1);
|
|
@@ -4407,7 +4417,11 @@ function getInnerChild$1(vnode) {
|
|
|
4407
4417
|
function setTransitionHooks(vnode, hooks) {
|
|
4408
4418
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
4409
4419
|
vnode.transition = hooks;
|
|
4410
|
-
|
|
4420
|
+
const subTree = vnode.component.subTree;
|
|
4421
|
+
setTransitionHooks(
|
|
4422
|
+
isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree,
|
|
4423
|
+
hooks
|
|
4424
|
+
);
|
|
4411
4425
|
} else if (vnode.shapeFlag & 128) {
|
|
4412
4426
|
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
4413
4427
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
@@ -4567,12 +4581,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4567
4581
|
}
|
|
4568
4582
|
}
|
|
4569
4583
|
if (isFunction(ref)) {
|
|
4570
|
-
|
|
4571
|
-
try {
|
|
4572
|
-
callWithErrorHandling(ref, owner, 12, [value, refs]);
|
|
4573
|
-
} finally {
|
|
4574
|
-
resetTracking();
|
|
4575
|
-
}
|
|
4584
|
+
callWithErrorHandling(ref, owner, 12, [value, refs]);
|
|
4576
4585
|
} else {
|
|
4577
4586
|
const _isString = isString(ref);
|
|
4578
4587
|
const _isRef = isRef(ref);
|
|
@@ -4944,6 +4953,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4944
4953
|
if (props) {
|
|
4945
4954
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ || forcePatch || hasDynamicProps || !optimized || patchFlag & (16 | 32)) {
|
|
4946
4955
|
const isCustomElement = el.tagName.includes("-");
|
|
4956
|
+
const namespace = el.namespaceURI.includes("svg") ? "svg" : el.namespaceURI.includes("MathML") ? "mathml" : void 0;
|
|
4947
4957
|
for (const key in props) {
|
|
4948
4958
|
if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && // #11189 skip if this node has directives that have created hooks
|
|
4949
4959
|
// as it could have mutated the DOM in any possible way
|
|
@@ -4952,7 +4962,10 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4952
4962
|
}
|
|
4953
4963
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
4954
4964
|
key[0] === "." || isCustomElement && !isReservedProp(key) || dynamicProps && dynamicProps.includes(key)) {
|
|
4955
|
-
|
|
4965
|
+
if (isUnchangedResourceProp(el, key, props[key])) {
|
|
4966
|
+
continue;
|
|
4967
|
+
}
|
|
4968
|
+
patchProp(el, key, null, props[key], namespace, parentComponent);
|
|
4956
4969
|
}
|
|
4957
4970
|
}
|
|
4958
4971
|
} else if (props.onClick) {
|
|
@@ -5145,6 +5158,13 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5145
5158
|
};
|
|
5146
5159
|
return [hydrate, hydrateNode];
|
|
5147
5160
|
}
|
|
5161
|
+
const resourceProps = /* @__PURE__ */ new Set(["src", "srcset", "href", "poster"]);
|
|
5162
|
+
function isUnchangedResourceProp(el, key, clientValue) {
|
|
5163
|
+
if (!resourceProps.has(key)) {
|
|
5164
|
+
return false;
|
|
5165
|
+
}
|
|
5166
|
+
return el.getAttribute(key) === (clientValue == null ? null : `${clientValue}`);
|
|
5167
|
+
}
|
|
5148
5168
|
function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
5149
5169
|
let mismatchType;
|
|
5150
5170
|
let mismatchKey;
|
|
@@ -5182,7 +5202,10 @@ function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
|
5182
5202
|
mismatchKey = "style";
|
|
5183
5203
|
}
|
|
5184
5204
|
} else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
|
|
5185
|
-
if (
|
|
5205
|
+
if (key === "hidden") {
|
|
5206
|
+
actual = normalizeHiddenValue(el.getAttribute(key));
|
|
5207
|
+
expected = normalizeHiddenValue(clientValue);
|
|
5208
|
+
} else if (isBooleanAttr(key)) {
|
|
5186
5209
|
actual = el.hasAttribute(key);
|
|
5187
5210
|
expected = includeBooleanAttr(clientValue);
|
|
5188
5211
|
} else if (clientValue == null) {
|
|
@@ -5218,6 +5241,15 @@ function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
|
5218
5241
|
}
|
|
5219
5242
|
return false;
|
|
5220
5243
|
}
|
|
5244
|
+
function normalizeHiddenValue(value) {
|
|
5245
|
+
if (!isRenderableAttrValue(value)) {
|
|
5246
|
+
return false;
|
|
5247
|
+
}
|
|
5248
|
+
if (isString(value)) {
|
|
5249
|
+
return value.toLowerCase() === "until-found" ? "until-found" : "";
|
|
5250
|
+
}
|
|
5251
|
+
return includeBooleanAttr(value) ? "" : false;
|
|
5252
|
+
}
|
|
5221
5253
|
function toClassSet(str) {
|
|
5222
5254
|
return new Set(str.trim().split(/\s+/));
|
|
5223
5255
|
}
|
|
@@ -5466,6 +5498,7 @@ function defineAsyncComponent(source) {
|
|
|
5466
5498
|
name: "AsyncComponentWrapper",
|
|
5467
5499
|
__asyncLoader: load,
|
|
5468
5500
|
__asyncHydrate(el, instance, hydrate) {
|
|
5501
|
+
const wasConnected = el.isConnected;
|
|
5469
5502
|
let patched = false;
|
|
5470
5503
|
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
5471
5504
|
const performHydrate = () => {
|
|
@@ -5477,6 +5510,7 @@ function defineAsyncComponent(source) {
|
|
|
5477
5510
|
}
|
|
5478
5511
|
return;
|
|
5479
5512
|
}
|
|
5513
|
+
if (!el.parentNode || wasConnected && !el.isConnected) return;
|
|
5480
5514
|
hydrate();
|
|
5481
5515
|
};
|
|
5482
5516
|
const doHydrate = hydrateStrategy ? () => {
|
|
@@ -6326,14 +6360,16 @@ function createSlots(slots, dynamicSlots) {
|
|
|
6326
6360
|
return slots;
|
|
6327
6361
|
}
|
|
6328
6362
|
|
|
6329
|
-
function renderSlot(slots, name, props
|
|
6363
|
+
function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
6364
|
+
if (props == null) props = {};
|
|
6330
6365
|
if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
|
|
6331
|
-
const
|
|
6332
|
-
|
|
6366
|
+
const slotProps = branchKey != null && props.key == null ? extend({}, props, { key: branchKey }) : props;
|
|
6367
|
+
const hasProps = Object.keys(slotProps).length > 0;
|
|
6368
|
+
if (name !== "default") slotProps.name = name;
|
|
6333
6369
|
return openBlock(), createBlock(
|
|
6334
6370
|
Fragment,
|
|
6335
6371
|
null,
|
|
6336
|
-
[createVNode("slot",
|
|
6372
|
+
[createVNode("slot", slotProps, fallback && fallback())],
|
|
6337
6373
|
hasProps ? -2 : 64
|
|
6338
6374
|
);
|
|
6339
6375
|
}
|
|
@@ -6347,26 +6383,34 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
|
6347
6383
|
if (slot && slot._c) {
|
|
6348
6384
|
slot._d = false;
|
|
6349
6385
|
}
|
|
6386
|
+
const prevStackSize = blockStack.length;
|
|
6350
6387
|
openBlock();
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6388
|
+
let rendered;
|
|
6389
|
+
try {
|
|
6390
|
+
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
6391
|
+
const slotKey = props.key || branchKey || // slot content array of a dynamic conditional slot may have a branch
|
|
6392
|
+
// key attached in the `createSlots` helper, respect that
|
|
6393
|
+
validSlotContent && validSlotContent.key;
|
|
6394
|
+
rendered = createBlock(
|
|
6395
|
+
Fragment,
|
|
6396
|
+
{
|
|
6397
|
+
key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
|
|
6398
|
+
(!validSlotContent && fallback ? "_fb" : "")
|
|
6399
|
+
},
|
|
6400
|
+
validSlotContent || (fallback ? fallback() : []),
|
|
6401
|
+
validSlotContent && slots._ === 1 ? 64 : -2
|
|
6402
|
+
);
|
|
6403
|
+
} catch (err) {
|
|
6404
|
+
for (let i = blockStack.length; i > prevStackSize; i--) closeBlock();
|
|
6405
|
+
throw err;
|
|
6406
|
+
} finally {
|
|
6407
|
+
if (slot && slot._c) {
|
|
6408
|
+
slot._d = true;
|
|
6409
|
+
}
|
|
6410
|
+
}
|
|
6364
6411
|
if (!noSlotted && rendered.scopeId) {
|
|
6365
6412
|
rendered.slotScopeIds = [rendered.scopeId + "-s"];
|
|
6366
6413
|
}
|
|
6367
|
-
if (slot && slot._c) {
|
|
6368
|
-
slot._d = true;
|
|
6369
|
-
}
|
|
6370
6414
|
return rendered;
|
|
6371
6415
|
}
|
|
6372
6416
|
function ensureValidVNode(vnodes) {
|
|
@@ -7546,7 +7590,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7546
7590
|
return vm;
|
|
7547
7591
|
}
|
|
7548
7592
|
}
|
|
7549
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
7593
|
+
Vue.version = `2.6.14-compat:${"3.5.41"}`;
|
|
7550
7594
|
Vue.config = singletonApp.config;
|
|
7551
7595
|
Vue.use = (plugin, ...options) => {
|
|
7552
7596
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -8570,12 +8614,13 @@ function renderComponentRoot(instance) {
|
|
|
8570
8614
|
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
8571
8615
|
}
|
|
8572
8616
|
if (vnode.transition) {
|
|
8573
|
-
|
|
8617
|
+
const child = isTeleport(root.type) ? getInnerChild$1(root) || root : root;
|
|
8618
|
+
if (!!(process.env.NODE_ENV !== "production") && !isElementRoot(child)) {
|
|
8574
8619
|
warn$1(
|
|
8575
8620
|
`Component inside <Transition> renders non-element root node that cannot be animated.`
|
|
8576
8621
|
);
|
|
8577
8622
|
}
|
|
8578
|
-
setTransitionHooks(
|
|
8623
|
+
setTransitionHooks(child, vnode.transition);
|
|
8579
8624
|
}
|
|
8580
8625
|
if (!!(process.env.NODE_ENV !== "production") && setRoot) {
|
|
8581
8626
|
setRoot(root);
|
|
@@ -11367,7 +11412,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11367
11412
|
let hasUnresolvedAncestor = false;
|
|
11368
11413
|
while (parent) {
|
|
11369
11414
|
if (parent.pendingBranch) {
|
|
11370
|
-
|
|
11415
|
+
for (let i = 0; i < effects.length; i++) {
|
|
11416
|
+
parent.effects.push(effects[i]);
|
|
11417
|
+
}
|
|
11371
11418
|
hasUnresolvedAncestor = true;
|
|
11372
11419
|
break;
|
|
11373
11420
|
}
|
|
@@ -11789,6 +11836,14 @@ function createBaseVNode(type, props = null, children = null, patchFlag = 0, dyn
|
|
|
11789
11836
|
if (!!(process.env.NODE_ENV !== "production") && vnode.key !== vnode.key) {
|
|
11790
11837
|
warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
|
|
11791
11838
|
}
|
|
11839
|
+
if (!!(process.env.NODE_ENV !== "production") && props && vnode.shapeFlag & 1) {
|
|
11840
|
+
const overwritingProp = props.innerHTML != null ? "innerHTML" : props.textContent != null ? "textContent" : null;
|
|
11841
|
+
if (overwritingProp && hasContentChildren(vnode.children)) {
|
|
11842
|
+
warn$1(
|
|
11843
|
+
`The \`${overwritingProp}\` prop on <${vnode.type}> will override its children. Remove either the \`${overwritingProp}\` prop or the children.`
|
|
11844
|
+
);
|
|
11845
|
+
}
|
|
11846
|
+
}
|
|
11792
11847
|
if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself
|
|
11793
11848
|
!isBlockNode && // has current parent block
|
|
11794
11849
|
currentBlock && // presence of a patch flag indicates this node needs patching on updates.
|
|
@@ -11806,6 +11861,11 @@ function createBaseVNode(type, props = null, children = null, patchFlag = 0, dyn
|
|
|
11806
11861
|
}
|
|
11807
11862
|
return vnode;
|
|
11808
11863
|
}
|
|
11864
|
+
function hasContentChildren(children) {
|
|
11865
|
+
if (isString(children)) return children !== "";
|
|
11866
|
+
if (isArray(children)) return children.length > 0;
|
|
11867
|
+
return false;
|
|
11868
|
+
}
|
|
11809
11869
|
const createVNode = !!(process.env.NODE_ENV !== "production") ? createVNodeWithArgsTransform : _createVNode;
|
|
11810
11870
|
function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
|
|
11811
11871
|
if (!type || type === NULL_DYNAMIC_COMPONENT) {
|
|
@@ -12262,7 +12322,12 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
12262
12322
|
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
12263
12323
|
if (isSSR) {
|
|
12264
12324
|
return setupResult.then((resolvedResult) => {
|
|
12265
|
-
|
|
12325
|
+
setInSSRSetupState(true);
|
|
12326
|
+
try {
|
|
12327
|
+
handleSetupResult(instance, resolvedResult, isSSR);
|
|
12328
|
+
} finally {
|
|
12329
|
+
setInSSRSetupState(false);
|
|
12330
|
+
}
|
|
12266
12331
|
}).catch((e) => {
|
|
12267
12332
|
handleError(e, instance, 0);
|
|
12268
12333
|
});
|
|
@@ -12752,7 +12817,7 @@ function isMemoSame(cached, memo) {
|
|
|
12752
12817
|
return true;
|
|
12753
12818
|
}
|
|
12754
12819
|
|
|
12755
|
-
const version = "3.5.
|
|
12820
|
+
const version = "3.5.41";
|
|
12756
12821
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
12757
12822
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12758
12823
|
const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
|
|
@@ -13810,7 +13875,9 @@ class VueElement extends BaseClass {
|
|
|
13810
13875
|
if (parent && parent._pendingResolve) {
|
|
13811
13876
|
this._pendingResolve = parent._pendingResolve.then(() => {
|
|
13812
13877
|
this._pendingResolve = void 0;
|
|
13813
|
-
this.
|
|
13878
|
+
if (this.isConnected) {
|
|
13879
|
+
return this._resolveDef();
|
|
13880
|
+
}
|
|
13814
13881
|
});
|
|
13815
13882
|
} else {
|
|
13816
13883
|
this._resolveDef();
|
|
@@ -13860,7 +13927,7 @@ class VueElement extends BaseClass {
|
|
|
13860
13927
|
*/
|
|
13861
13928
|
_resolveDef() {
|
|
13862
13929
|
if (this._pendingResolve) {
|
|
13863
|
-
return;
|
|
13930
|
+
return this._pendingResolve;
|
|
13864
13931
|
}
|
|
13865
13932
|
for (let i = 0; i < this.attributes.length; i++) {
|
|
13866
13933
|
this._setAttr(this.attributes[i].name);
|
|
@@ -13900,6 +13967,7 @@ class VueElement extends BaseClass {
|
|
|
13900
13967
|
def.configureApp = this._def.configureApp;
|
|
13901
13968
|
resolve(this._def = def, true);
|
|
13902
13969
|
});
|
|
13970
|
+
return this._pendingResolve;
|
|
13903
13971
|
} else {
|
|
13904
13972
|
resolve(this._def);
|
|
13905
13973
|
}
|
|
@@ -13937,6 +14005,11 @@ class VueElement extends BaseClass {
|
|
|
13937
14005
|
}
|
|
13938
14006
|
}
|
|
13939
14007
|
for (const key of declaredPropKeys.map(camelize)) {
|
|
14008
|
+
if (!!(process.env.NODE_ENV !== "production") && key in Object.getPrototypeOf(this)) {
|
|
14009
|
+
warn(
|
|
14010
|
+
`Custom element prop "${key}" conflicts with an existing property on the element and will overwrite it.`
|
|
14011
|
+
);
|
|
14012
|
+
}
|
|
13940
14013
|
Object.defineProperty(this, key, {
|
|
13941
14014
|
get() {
|
|
13942
14015
|
return this._getProp(key);
|
|
@@ -14430,6 +14503,7 @@ function onCompositionEnd(e) {
|
|
|
14430
14503
|
}
|
|
14431
14504
|
}
|
|
14432
14505
|
const assignKey = /* @__PURE__ */ Symbol("_assign");
|
|
14506
|
+
const initialValueKey = /* @__PURE__ */ Symbol("_initialValue");
|
|
14433
14507
|
function castValue(value, trim, number) {
|
|
14434
14508
|
if (trim) value = value.trim();
|
|
14435
14509
|
if (number) value = looseToNumber(value);
|
|
@@ -14437,6 +14511,13 @@ function castValue(value, trim, number) {
|
|
|
14437
14511
|
}
|
|
14438
14512
|
const vModelText = {
|
|
14439
14513
|
created(el, { modifiers: { lazy, trim, number } }, vnode) {
|
|
14514
|
+
if (el.parentNode) {
|
|
14515
|
+
if (el.type === "text") {
|
|
14516
|
+
el[initialValueKey] = el.defaultValue.replace(/[\r\n]/g, "");
|
|
14517
|
+
} else if (el.type === "textarea") {
|
|
14518
|
+
el[initialValueKey] = el.defaultValue.replace(/\r\n?/g, "\n");
|
|
14519
|
+
}
|
|
14520
|
+
}
|
|
14440
14521
|
el[assignKey] = getModelAssigner(vnode);
|
|
14441
14522
|
const castToNumber = number || vnode.props && vnode.props.type === "number";
|
|
14442
14523
|
addEventListener(el, lazy ? "change" : "input", (e) => {
|
|
@@ -14455,8 +14536,15 @@ const vModelText = {
|
|
|
14455
14536
|
}
|
|
14456
14537
|
},
|
|
14457
14538
|
// set value on mounted so it's after min/max for type="range"
|
|
14458
|
-
mounted(el, { value }) {
|
|
14459
|
-
|
|
14539
|
+
mounted(el, { value, modifiers: { trim, number } }) {
|
|
14540
|
+
const newValue = value == null ? "" : value;
|
|
14541
|
+
const initialValue = el[initialValueKey];
|
|
14542
|
+
delete el[initialValueKey];
|
|
14543
|
+
if (initialValue !== void 0 && (el.type === "text" || el.type === "textarea") && el.value !== initialValue) {
|
|
14544
|
+
el[assignKey](castValue(el.value, trim, number));
|
|
14545
|
+
} else {
|
|
14546
|
+
el.value = newValue;
|
|
14547
|
+
}
|
|
14460
14548
|
},
|
|
14461
14549
|
beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) {
|
|
14462
14550
|
el[assignKey] = getModelAssigner(vnode);
|
|
@@ -14552,13 +14640,13 @@ const vModelSelect = {
|
|
|
14552
14640
|
// <select multiple> value need to be deep traversed
|
|
14553
14641
|
deep: true,
|
|
14554
14642
|
created(el, { value, modifiers: { number } }, vnode) {
|
|
14555
|
-
|
|
14643
|
+
el._modelValue = value;
|
|
14556
14644
|
addEventListener(el, "change", () => {
|
|
14557
14645
|
const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map(
|
|
14558
14646
|
(o) => number ? looseToNumber(getValue(o)) : getValue(o)
|
|
14559
14647
|
);
|
|
14560
14648
|
el[assignKey](
|
|
14561
|
-
el.multiple ?
|
|
14649
|
+
el.multiple ? isSet(el._modelValue) ? new Set(selectedVal) : selectedVal : selectedVal[0]
|
|
14562
14650
|
);
|
|
14563
14651
|
el._assigning = true;
|
|
14564
14652
|
nextTick(() => {
|
|
@@ -14572,7 +14660,8 @@ const vModelSelect = {
|
|
|
14572
14660
|
mounted(el, { value }) {
|
|
14573
14661
|
setSelected(el, value);
|
|
14574
14662
|
},
|
|
14575
|
-
beforeUpdate(el,
|
|
14663
|
+
beforeUpdate(el, { value }, vnode) {
|
|
14664
|
+
el._modelValue = value;
|
|
14576
14665
|
el[assignKey] = getModelAssigner(vnode);
|
|
14577
14666
|
},
|
|
14578
14667
|
updated(el, { value }) {
|