@vue/runtime-dom 3.3.7 → 3.3.9
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/runtime-dom.cjs.js +7 -8
- package/dist/runtime-dom.cjs.prod.js +7 -8
- package/dist/runtime-dom.d.ts +27 -14
- package/dist/runtime-dom.esm-browser.js +115 -83
- package/dist/runtime-dom.esm-browser.prod.js +5 -5
- package/dist/runtime-dom.esm-bundler.js +7 -8
- package/dist/runtime-dom.global.js +115 -83
- package/dist/runtime-dom.global.prod.js +5 -5
- package/package.json +4 -4
package/dist/runtime-dom.cjs.js
CHANGED
|
@@ -1097,21 +1097,20 @@ const vModelText = {
|
|
|
1097
1097
|
el[assignKey] = getModelAssigner(vnode);
|
|
1098
1098
|
if (el.composing)
|
|
1099
1099
|
return;
|
|
1100
|
+
const elValue = number || el.type === "number" ? shared.looseToNumber(el.value) : el.value;
|
|
1101
|
+
const newValue = value == null ? "" : value;
|
|
1102
|
+
if (elValue === newValue) {
|
|
1103
|
+
return;
|
|
1104
|
+
}
|
|
1100
1105
|
if (document.activeElement === el && el.type !== "range") {
|
|
1101
1106
|
if (lazy) {
|
|
1102
1107
|
return;
|
|
1103
1108
|
}
|
|
1104
|
-
if (trim && el.value.trim() ===
|
|
1105
|
-
return;
|
|
1106
|
-
}
|
|
1107
|
-
if ((number || el.type === "number") && shared.looseToNumber(el.value) === value) {
|
|
1109
|
+
if (trim && el.value.trim() === newValue) {
|
|
1108
1110
|
return;
|
|
1109
1111
|
}
|
|
1110
1112
|
}
|
|
1111
|
-
|
|
1112
|
-
if (el.value !== newValue) {
|
|
1113
|
-
el.value = newValue;
|
|
1114
|
-
}
|
|
1113
|
+
el.value = newValue;
|
|
1115
1114
|
}
|
|
1116
1115
|
};
|
|
1117
1116
|
const vModelCheckbox = {
|
|
@@ -1056,21 +1056,20 @@ const vModelText = {
|
|
|
1056
1056
|
el[assignKey] = getModelAssigner(vnode);
|
|
1057
1057
|
if (el.composing)
|
|
1058
1058
|
return;
|
|
1059
|
+
const elValue = number || el.type === "number" ? shared.looseToNumber(el.value) : el.value;
|
|
1060
|
+
const newValue = value == null ? "" : value;
|
|
1061
|
+
if (elValue === newValue) {
|
|
1062
|
+
return;
|
|
1063
|
+
}
|
|
1059
1064
|
if (document.activeElement === el && el.type !== "range") {
|
|
1060
1065
|
if (lazy) {
|
|
1061
1066
|
return;
|
|
1062
1067
|
}
|
|
1063
|
-
if (trim && el.value.trim() ===
|
|
1064
|
-
return;
|
|
1065
|
-
}
|
|
1066
|
-
if ((number || el.type === "number") && shared.looseToNumber(el.value) === value) {
|
|
1068
|
+
if (trim && el.value.trim() === newValue) {
|
|
1067
1069
|
return;
|
|
1068
1070
|
}
|
|
1069
1071
|
}
|
|
1070
|
-
|
|
1071
|
-
if (el.value !== newValue) {
|
|
1072
|
-
el.value = newValue;
|
|
1073
|
-
}
|
|
1072
|
+
el.value = newValue;
|
|
1074
1073
|
}
|
|
1075
1074
|
};
|
|
1076
1075
|
const vModelCheckbox = {
|
package/dist/runtime-dom.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SetupContext, RenderFunction, ComputedOptions, MethodOptions, ComponentOptionsMixin, EmitsOptions, ComponentInjectOptions, SlotsType, ComponentOptionsWithoutProps, ComponentOptionsWithArrayProps, ComponentPropsOptions, ComponentOptionsWithObjectProps, ExtractPropTypes,
|
|
1
|
+
import { SetupContext, RenderFunction, ComputedOptions, MethodOptions, ComponentOptionsMixin, EmitsOptions, ComponentInjectOptions, SlotsType, ComponentOptionsWithoutProps, ComponentOptionsWithArrayProps, ComponentPropsOptions, ComponentOptionsWithObjectProps, ExtractPropTypes, DefineComponent, RootHydrateFunction, ConcreteComponent, BaseTransitionProps, FunctionalComponent, ObjectDirective, VNodeRef, RootRenderFunction, CreateAppFunction } from '@vue/runtime-core';
|
|
2
2
|
export * from '@vue/runtime-core';
|
|
3
3
|
import * as CSS from 'csstype';
|
|
4
4
|
|
|
@@ -17,9 +17,7 @@ export declare function defineCustomElement<PropNames extends string, RawBinding
|
|
|
17
17
|
export declare function defineCustomElement<PropsOptions extends Readonly<ComponentPropsOptions>, RawBindings, D, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = Record<string, any>, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}>(options: ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, I, II, S> & {
|
|
18
18
|
styles?: string[];
|
|
19
19
|
}): VueElementConstructor<ExtractPropTypes<PropsOptions>>;
|
|
20
|
-
export declare function defineCustomElement(options:
|
|
21
|
-
new (...args: any[]): ComponentPublicInstance;
|
|
22
|
-
}): VueElementConstructor;
|
|
20
|
+
export declare function defineCustomElement<P>(options: DefineComponent<P, any, any, any>): VueElementConstructor<ExtractPropTypes<P>>;
|
|
23
21
|
/*! #__NO_SIDE_EFFECTS__ */
|
|
24
22
|
export declare const defineSSRCustomElement: typeof defineCustomElement;
|
|
25
23
|
declare const BaseClass: {
|
|
@@ -271,7 +269,7 @@ interface AriaAttributes {
|
|
|
271
269
|
* Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.
|
|
272
270
|
* @see aria-atomic.
|
|
273
271
|
*/
|
|
274
|
-
'aria-relevant'?: 'additions' | 'additions text' | 'all' | 'removals' | 'text';
|
|
272
|
+
'aria-relevant'?: 'additions' | 'additions removals' | 'additions text' | 'all' | 'removals' | 'removals additions' | 'removals text' | 'text' | 'text additions' | 'text removals';
|
|
275
273
|
/** Indicates that user input is required on the element before a form may be submitted. */
|
|
276
274
|
'aria-required'?: Booleanish;
|
|
277
275
|
/** Defines a human-readable, author-localized description for the role of an element. */
|
|
@@ -315,7 +313,7 @@ interface AriaAttributes {
|
|
|
315
313
|
/** Defines the human readable text alternative of aria-valuenow for a range widget. */
|
|
316
314
|
'aria-valuetext'?: string;
|
|
317
315
|
}
|
|
318
|
-
export type StyleValue = string | CSSProperties | Array<StyleValue>;
|
|
316
|
+
export type StyleValue = false | null | undefined | string | CSSProperties | Array<StyleValue>;
|
|
319
317
|
export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> {
|
|
320
318
|
innerHTML?: string;
|
|
321
319
|
class?: any;
|
|
@@ -411,7 +409,7 @@ export interface ButtonHTMLAttributes extends HTMLAttributes {
|
|
|
411
409
|
formtarget?: string;
|
|
412
410
|
name?: string;
|
|
413
411
|
type?: 'submit' | 'reset' | 'button';
|
|
414
|
-
value?: string | string
|
|
412
|
+
value?: string | ReadonlyArray<string> | number;
|
|
415
413
|
}
|
|
416
414
|
export interface CanvasHTMLAttributes extends HTMLAttributes {
|
|
417
415
|
height?: Numberish;
|
|
@@ -425,10 +423,11 @@ export interface ColgroupHTMLAttributes extends HTMLAttributes {
|
|
|
425
423
|
span?: Numberish;
|
|
426
424
|
}
|
|
427
425
|
export interface DataHTMLAttributes extends HTMLAttributes {
|
|
428
|
-
value?: string | string
|
|
426
|
+
value?: string | ReadonlyArray<string> | number;
|
|
429
427
|
}
|
|
430
428
|
export interface DetailsHTMLAttributes extends HTMLAttributes {
|
|
431
429
|
open?: Booleanish;
|
|
430
|
+
onToggle?: Event;
|
|
432
431
|
}
|
|
433
432
|
export interface DelHTMLAttributes extends HTMLAttributes {
|
|
434
433
|
cite?: string;
|
|
@@ -465,13 +464,17 @@ export interface IframeHTMLAttributes extends HTMLAttributes {
|
|
|
465
464
|
allow?: string;
|
|
466
465
|
allowfullscreen?: Booleanish;
|
|
467
466
|
allowtransparency?: Booleanish;
|
|
467
|
+
/** @deprecated */
|
|
468
468
|
frameborder?: Numberish;
|
|
469
469
|
height?: Numberish;
|
|
470
|
+
/** @deprecated */
|
|
470
471
|
marginheight?: Numberish;
|
|
472
|
+
/** @deprecated */
|
|
471
473
|
marginwidth?: Numberish;
|
|
472
474
|
name?: string;
|
|
473
475
|
referrerpolicy?: HTMLAttributeReferrerPolicy;
|
|
474
476
|
sandbox?: string;
|
|
477
|
+
/** @deprecated */
|
|
475
478
|
scrolling?: string;
|
|
476
479
|
seamless?: Booleanish;
|
|
477
480
|
src?: string;
|
|
@@ -483,13 +486,13 @@ export interface ImgHTMLAttributes extends HTMLAttributes {
|
|
|
483
486
|
crossorigin?: 'anonymous' | 'use-credentials' | '';
|
|
484
487
|
decoding?: 'async' | 'auto' | 'sync';
|
|
485
488
|
height?: Numberish;
|
|
489
|
+
loading?: 'eager' | 'lazy';
|
|
486
490
|
referrerpolicy?: HTMLAttributeReferrerPolicy;
|
|
487
491
|
sizes?: string;
|
|
488
492
|
src?: string;
|
|
489
493
|
srcset?: string;
|
|
490
494
|
usemap?: string;
|
|
491
495
|
width?: Numberish;
|
|
492
|
-
loading?: 'lazy' | 'eager';
|
|
493
496
|
}
|
|
494
497
|
export interface InsHTMLAttributes extends HTMLAttributes {
|
|
495
498
|
cite?: string;
|
|
@@ -505,6 +508,7 @@ export interface InputHTMLAttributes extends HTMLAttributes {
|
|
|
505
508
|
checked?: Booleanish | any[] | Set<any>;
|
|
506
509
|
crossorigin?: string;
|
|
507
510
|
disabled?: Booleanish;
|
|
511
|
+
enterKeyHint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';
|
|
508
512
|
form?: string;
|
|
509
513
|
formaction?: string;
|
|
510
514
|
formenctype?: string;
|
|
@@ -545,7 +549,7 @@ export interface LabelHTMLAttributes extends HTMLAttributes {
|
|
|
545
549
|
form?: string;
|
|
546
550
|
}
|
|
547
551
|
export interface LiHTMLAttributes extends HTMLAttributes {
|
|
548
|
-
value?: string | string
|
|
552
|
+
value?: string | ReadonlyArray<string> | number;
|
|
549
553
|
}
|
|
550
554
|
export interface LinkHTMLAttributes extends HTMLAttributes {
|
|
551
555
|
as?: string;
|
|
@@ -558,6 +562,7 @@ export interface LinkHTMLAttributes extends HTMLAttributes {
|
|
|
558
562
|
rel?: string;
|
|
559
563
|
sizes?: string;
|
|
560
564
|
type?: string;
|
|
565
|
+
charset?: string;
|
|
561
566
|
}
|
|
562
567
|
export interface MapHTMLAttributes extends HTMLAttributes {
|
|
563
568
|
name?: string;
|
|
@@ -590,7 +595,7 @@ export interface MeterHTMLAttributes extends HTMLAttributes {
|
|
|
590
595
|
max?: Numberish;
|
|
591
596
|
min?: Numberish;
|
|
592
597
|
optimum?: Numberish;
|
|
593
|
-
value?: string | string
|
|
598
|
+
value?: string | ReadonlyArray<string> | number;
|
|
594
599
|
}
|
|
595
600
|
export interface QuoteHTMLAttributes extends HTMLAttributes {
|
|
596
601
|
cite?: string;
|
|
@@ -628,14 +633,15 @@ export interface OutputHTMLAttributes extends HTMLAttributes {
|
|
|
628
633
|
}
|
|
629
634
|
export interface ParamHTMLAttributes extends HTMLAttributes {
|
|
630
635
|
name?: string;
|
|
631
|
-
value?: string | string
|
|
636
|
+
value?: string | ReadonlyArray<string> | number;
|
|
632
637
|
}
|
|
633
638
|
export interface ProgressHTMLAttributes extends HTMLAttributes {
|
|
634
639
|
max?: Numberish;
|
|
635
|
-
value?: string | string
|
|
640
|
+
value?: string | ReadonlyArray<string> | number;
|
|
636
641
|
}
|
|
637
642
|
export interface ScriptHTMLAttributes extends HTMLAttributes {
|
|
638
643
|
async?: Booleanish;
|
|
644
|
+
/** @deprecated */
|
|
639
645
|
charset?: string;
|
|
640
646
|
crossorigin?: string;
|
|
641
647
|
defer?: Booleanish;
|
|
@@ -674,6 +680,7 @@ export interface TableHTMLAttributes extends HTMLAttributes {
|
|
|
674
680
|
cellpadding?: Numberish;
|
|
675
681
|
cellspacing?: Numberish;
|
|
676
682
|
summary?: string;
|
|
683
|
+
width?: Numberish;
|
|
677
684
|
}
|
|
678
685
|
export interface TextareaHTMLAttributes extends HTMLAttributes {
|
|
679
686
|
autocomplete?: string;
|
|
@@ -689,7 +696,7 @@ export interface TextareaHTMLAttributes extends HTMLAttributes {
|
|
|
689
696
|
readonly?: Booleanish;
|
|
690
697
|
required?: Booleanish;
|
|
691
698
|
rows?: Numberish;
|
|
692
|
-
value?: string | string
|
|
699
|
+
value?: string | ReadonlyArray<string> | number;
|
|
693
700
|
wrap?: string;
|
|
694
701
|
}
|
|
695
702
|
export interface TdHTMLAttributes extends HTMLAttributes {
|
|
@@ -698,6 +705,9 @@ export interface TdHTMLAttributes extends HTMLAttributes {
|
|
|
698
705
|
headers?: string;
|
|
699
706
|
rowspan?: Numberish;
|
|
700
707
|
scope?: string;
|
|
708
|
+
abbr?: string;
|
|
709
|
+
height?: Numberish;
|
|
710
|
+
width?: Numberish;
|
|
701
711
|
valign?: 'top' | 'middle' | 'bottom' | 'baseline';
|
|
702
712
|
}
|
|
703
713
|
export interface ThHTMLAttributes extends HTMLAttributes {
|
|
@@ -706,6 +716,7 @@ export interface ThHTMLAttributes extends HTMLAttributes {
|
|
|
706
716
|
headers?: string;
|
|
707
717
|
rowspan?: Numberish;
|
|
708
718
|
scope?: string;
|
|
719
|
+
abbr?: string;
|
|
709
720
|
}
|
|
710
721
|
export interface TimeHTMLAttributes extends HTMLAttributes {
|
|
711
722
|
datetime?: string;
|
|
@@ -723,6 +734,7 @@ export interface VideoHTMLAttributes extends MediaHTMLAttributes {
|
|
|
723
734
|
poster?: string;
|
|
724
735
|
width?: Numberish;
|
|
725
736
|
disablePictureInPicture?: Booleanish;
|
|
737
|
+
disableRemotePlayback?: Booleanish;
|
|
726
738
|
}
|
|
727
739
|
export interface WebViewHTMLAttributes extends HTMLAttributes {
|
|
728
740
|
allowfullscreen?: Booleanish;
|
|
@@ -765,6 +777,7 @@ export interface SVGAttributes extends AriaAttributes, EventHandlers<Events> {
|
|
|
765
777
|
width?: Numberish;
|
|
766
778
|
role?: string;
|
|
767
779
|
tabindex?: Numberish;
|
|
780
|
+
crossOrigin?: 'anonymous' | 'use-credentials' | '';
|
|
768
781
|
'accent-height'?: Numberish;
|
|
769
782
|
accumulate?: 'none' | 'sum';
|
|
770
783
|
additive?: 'replace' | 'sum';
|
|
@@ -936,7 +936,7 @@ function createReadonlyMethod(type) {
|
|
|
936
936
|
toRaw(this)
|
|
937
937
|
);
|
|
938
938
|
}
|
|
939
|
-
return type === "delete" ? false : this;
|
|
939
|
+
return type === "delete" ? false : type === "clear" ? void 0 : this;
|
|
940
940
|
};
|
|
941
941
|
}
|
|
942
942
|
function createInstrumentations() {
|
|
@@ -2207,9 +2207,19 @@ function renderComponentRoot(instance) {
|
|
|
2207
2207
|
try {
|
|
2208
2208
|
if (vnode.shapeFlag & 4) {
|
|
2209
2209
|
const proxyToUse = withProxy || proxy;
|
|
2210
|
+
const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, {
|
|
2211
|
+
get(target, key, receiver) {
|
|
2212
|
+
warn(
|
|
2213
|
+
`Property '${String(
|
|
2214
|
+
key
|
|
2215
|
+
)}' was accessed via 'this'. Avoid using 'this' in templates.`
|
|
2216
|
+
);
|
|
2217
|
+
return Reflect.get(target, key, receiver);
|
|
2218
|
+
}
|
|
2219
|
+
}) : proxyToUse;
|
|
2210
2220
|
result = normalizeVNode(
|
|
2211
2221
|
render.call(
|
|
2212
|
-
|
|
2222
|
+
thisProxy,
|
|
2213
2223
|
proxyToUse,
|
|
2214
2224
|
renderCache,
|
|
2215
2225
|
props,
|
|
@@ -2444,6 +2454,61 @@ function updateHOCHostEl({ vnode, parent }, el) {
|
|
|
2444
2454
|
}
|
|
2445
2455
|
}
|
|
2446
2456
|
|
|
2457
|
+
const COMPONENTS = "components";
|
|
2458
|
+
const DIRECTIVES = "directives";
|
|
2459
|
+
function resolveComponent(name, maybeSelfReference) {
|
|
2460
|
+
return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
|
|
2461
|
+
}
|
|
2462
|
+
const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
|
|
2463
|
+
function resolveDynamicComponent(component) {
|
|
2464
|
+
if (isString(component)) {
|
|
2465
|
+
return resolveAsset(COMPONENTS, component, false) || component;
|
|
2466
|
+
} else {
|
|
2467
|
+
return component || NULL_DYNAMIC_COMPONENT;
|
|
2468
|
+
}
|
|
2469
|
+
}
|
|
2470
|
+
function resolveDirective(name) {
|
|
2471
|
+
return resolveAsset(DIRECTIVES, name);
|
|
2472
|
+
}
|
|
2473
|
+
function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
|
|
2474
|
+
const instance = currentRenderingInstance || currentInstance;
|
|
2475
|
+
if (instance) {
|
|
2476
|
+
const Component = instance.type;
|
|
2477
|
+
if (type === COMPONENTS) {
|
|
2478
|
+
const selfName = getComponentName(
|
|
2479
|
+
Component,
|
|
2480
|
+
false
|
|
2481
|
+
/* do not include inferred name to avoid breaking existing code */
|
|
2482
|
+
);
|
|
2483
|
+
if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
|
|
2484
|
+
return Component;
|
|
2485
|
+
}
|
|
2486
|
+
}
|
|
2487
|
+
const res = (
|
|
2488
|
+
// local registration
|
|
2489
|
+
// check instance[type] first which is resolved for options API
|
|
2490
|
+
resolve(instance[type] || Component[type], name) || // global registration
|
|
2491
|
+
resolve(instance.appContext[type], name)
|
|
2492
|
+
);
|
|
2493
|
+
if (!res && maybeSelfReference) {
|
|
2494
|
+
return Component;
|
|
2495
|
+
}
|
|
2496
|
+
if (warnMissing && !res) {
|
|
2497
|
+
const extra = type === COMPONENTS ? `
|
|
2498
|
+
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
|
|
2499
|
+
warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
|
|
2500
|
+
}
|
|
2501
|
+
return res;
|
|
2502
|
+
} else {
|
|
2503
|
+
warn(
|
|
2504
|
+
`resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
|
|
2505
|
+
);
|
|
2506
|
+
}
|
|
2507
|
+
}
|
|
2508
|
+
function resolve(registry, name) {
|
|
2509
|
+
return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
|
|
2510
|
+
}
|
|
2511
|
+
|
|
2447
2512
|
const isSuspense = (type) => type.__isSuspense;
|
|
2448
2513
|
const SuspenseImpl = {
|
|
2449
2514
|
name: "Suspense",
|
|
@@ -2978,7 +3043,7 @@ function normalizeSuspenseSlot(s) {
|
|
|
2978
3043
|
}
|
|
2979
3044
|
if (isArray(s)) {
|
|
2980
3045
|
const singleChild = filterSingleRoot(s);
|
|
2981
|
-
if (!singleChild) {
|
|
3046
|
+
if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {
|
|
2982
3047
|
warn(`<Suspense> slots expect a single root node.`);
|
|
2983
3048
|
}
|
|
2984
3049
|
s = singleChild;
|
|
@@ -3116,6 +3181,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
|
|
|
3116
3181
|
let onCleanup = (fn) => {
|
|
3117
3182
|
cleanup = effect.onStop = () => {
|
|
3118
3183
|
callWithErrorHandling(fn, instance, 4);
|
|
3184
|
+
cleanup = effect.onStop = void 0;
|
|
3119
3185
|
};
|
|
3120
3186
|
};
|
|
3121
3187
|
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
@@ -3586,7 +3652,11 @@ function emptyPlaceholder(vnode) {
|
|
|
3586
3652
|
}
|
|
3587
3653
|
}
|
|
3588
3654
|
function getKeepAliveChild(vnode) {
|
|
3589
|
-
return isKeepAlive(vnode) ?
|
|
3655
|
+
return isKeepAlive(vnode) ? (
|
|
3656
|
+
// #7121 ensure get the child component subtree in case
|
|
3657
|
+
// it's been replaced during HMR
|
|
3658
|
+
vnode.component ? vnode.component.subTree : vnode.children ? vnode.children[0] : void 0
|
|
3659
|
+
) : vnode;
|
|
3590
3660
|
}
|
|
3591
3661
|
function setTransitionHooks(vnode, hooks) {
|
|
3592
3662
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
@@ -4063,61 +4133,6 @@ function onErrorCaptured(hook, target = currentInstance) {
|
|
|
4063
4133
|
injectHook("ec", hook, target);
|
|
4064
4134
|
}
|
|
4065
4135
|
|
|
4066
|
-
const COMPONENTS = "components";
|
|
4067
|
-
const DIRECTIVES = "directives";
|
|
4068
|
-
function resolveComponent(name, maybeSelfReference) {
|
|
4069
|
-
return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
|
|
4070
|
-
}
|
|
4071
|
-
const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
|
|
4072
|
-
function resolveDynamicComponent(component) {
|
|
4073
|
-
if (isString(component)) {
|
|
4074
|
-
return resolveAsset(COMPONENTS, component, false) || component;
|
|
4075
|
-
} else {
|
|
4076
|
-
return component || NULL_DYNAMIC_COMPONENT;
|
|
4077
|
-
}
|
|
4078
|
-
}
|
|
4079
|
-
function resolveDirective(name) {
|
|
4080
|
-
return resolveAsset(DIRECTIVES, name);
|
|
4081
|
-
}
|
|
4082
|
-
function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
|
|
4083
|
-
const instance = currentRenderingInstance || currentInstance;
|
|
4084
|
-
if (instance) {
|
|
4085
|
-
const Component = instance.type;
|
|
4086
|
-
if (type === COMPONENTS) {
|
|
4087
|
-
const selfName = getComponentName(
|
|
4088
|
-
Component,
|
|
4089
|
-
false
|
|
4090
|
-
/* do not include inferred name to avoid breaking existing code */
|
|
4091
|
-
);
|
|
4092
|
-
if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
|
|
4093
|
-
return Component;
|
|
4094
|
-
}
|
|
4095
|
-
}
|
|
4096
|
-
const res = (
|
|
4097
|
-
// local registration
|
|
4098
|
-
// check instance[type] first which is resolved for options API
|
|
4099
|
-
resolve(instance[type] || Component[type], name) || // global registration
|
|
4100
|
-
resolve(instance.appContext[type], name)
|
|
4101
|
-
);
|
|
4102
|
-
if (!res && maybeSelfReference) {
|
|
4103
|
-
return Component;
|
|
4104
|
-
}
|
|
4105
|
-
if (warnMissing && !res) {
|
|
4106
|
-
const extra = type === COMPONENTS ? `
|
|
4107
|
-
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
|
|
4108
|
-
warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
|
|
4109
|
-
}
|
|
4110
|
-
return res;
|
|
4111
|
-
} else {
|
|
4112
|
-
warn(
|
|
4113
|
-
`resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
|
|
4114
|
-
);
|
|
4115
|
-
}
|
|
4116
|
-
}
|
|
4117
|
-
function resolve(registry, name) {
|
|
4118
|
-
return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
|
|
4119
|
-
}
|
|
4120
|
-
|
|
4121
4136
|
function renderList(source, renderItem, cache, index) {
|
|
4122
4137
|
let ret;
|
|
4123
4138
|
const cached = cache && cache[index];
|
|
@@ -5634,6 +5649,9 @@ function assertType(value, type) {
|
|
|
5634
5649
|
};
|
|
5635
5650
|
}
|
|
5636
5651
|
function getInvalidTypeMessage(name, value, expectedTypes) {
|
|
5652
|
+
if (expectedTypes.length === 0) {
|
|
5653
|
+
return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`;
|
|
5654
|
+
}
|
|
5637
5655
|
let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
|
|
5638
5656
|
const expectedType = expectedTypes[0];
|
|
5639
5657
|
const receivedType = toRawType(value);
|
|
@@ -5903,6 +5921,20 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
5903
5921
|
const { type, ref, shapeFlag, patchFlag } = vnode;
|
|
5904
5922
|
let domType = node.nodeType;
|
|
5905
5923
|
vnode.el = node;
|
|
5924
|
+
{
|
|
5925
|
+
if (!("__vnode" in node)) {
|
|
5926
|
+
Object.defineProperty(node, "__vnode", {
|
|
5927
|
+
value: vnode,
|
|
5928
|
+
enumerable: false
|
|
5929
|
+
});
|
|
5930
|
+
}
|
|
5931
|
+
if (!("__vueParentComponent" in node)) {
|
|
5932
|
+
Object.defineProperty(node, "__vueParentComponent", {
|
|
5933
|
+
value: parentComponent,
|
|
5934
|
+
enumerable: false
|
|
5935
|
+
});
|
|
5936
|
+
}
|
|
5937
|
+
}
|
|
5906
5938
|
if (patchFlag === -2) {
|
|
5907
5939
|
optimized = false;
|
|
5908
5940
|
vnode.dynamicChildren = null;
|
|
@@ -5933,15 +5965,15 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
5933
5965
|
}
|
|
5934
5966
|
break;
|
|
5935
5967
|
case Comment:
|
|
5936
|
-
if (
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5968
|
+
if (isTemplateNode(node)) {
|
|
5969
|
+
nextNode = nextSibling(node);
|
|
5970
|
+
replaceNode(
|
|
5971
|
+
vnode.el = node.content.firstChild,
|
|
5972
|
+
node,
|
|
5973
|
+
parentComponent
|
|
5974
|
+
);
|
|
5975
|
+
} else if (domType !== 8 /* COMMENT */ || isFragmentStart) {
|
|
5976
|
+
nextNode = onMismatch();
|
|
5945
5977
|
} else {
|
|
5946
5978
|
nextNode = nextSibling(node);
|
|
5947
5979
|
}
|
|
@@ -6064,15 +6096,16 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
6064
6096
|
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
6065
6097
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
6066
6098
|
const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
|
|
6067
|
-
const
|
|
6099
|
+
const forcePatch = type === "input" || type === "option";
|
|
6068
6100
|
{
|
|
6069
6101
|
if (dirs) {
|
|
6070
6102
|
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
6071
6103
|
}
|
|
6072
6104
|
if (props) {
|
|
6073
|
-
if (
|
|
6105
|
+
if (forcePatch || !optimized || patchFlag & (16 | 32)) {
|
|
6074
6106
|
for (const key in props) {
|
|
6075
|
-
if (
|
|
6107
|
+
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
6108
|
+
key[0] === ".") {
|
|
6076
6109
|
patchProp(
|
|
6077
6110
|
el,
|
|
6078
6111
|
key,
|
|
@@ -6285,8 +6318,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
6285
6318
|
let parent = parentComponent;
|
|
6286
6319
|
while (parent) {
|
|
6287
6320
|
if (parent.vnode.el === oldNode) {
|
|
6288
|
-
parent.vnode.el = newNode;
|
|
6289
|
-
parent.subTree.el = newNode;
|
|
6321
|
+
parent.vnode.el = parent.subTree.el = newNode;
|
|
6290
6322
|
}
|
|
6291
6323
|
parent = parent.parent;
|
|
6292
6324
|
}
|
|
@@ -7830,6 +7862,7 @@ const resolveTarget = (props, select) => {
|
|
|
7830
7862
|
}
|
|
7831
7863
|
};
|
|
7832
7864
|
const TeleportImpl = {
|
|
7865
|
+
name: "Teleport",
|
|
7833
7866
|
__isTeleport: true,
|
|
7834
7867
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) {
|
|
7835
7868
|
const {
|
|
@@ -8251,7 +8284,7 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
8251
8284
|
if (shapeFlag & 4 && isProxy(type)) {
|
|
8252
8285
|
type = toRaw(type);
|
|
8253
8286
|
warn(
|
|
8254
|
-
`Vue received a Component
|
|
8287
|
+
`Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`,
|
|
8255
8288
|
`
|
|
8256
8289
|
Component that was made reactive: `,
|
|
8257
8290
|
type
|
|
@@ -9072,7 +9105,7 @@ function isMemoSame(cached, memo) {
|
|
|
9072
9105
|
return true;
|
|
9073
9106
|
}
|
|
9074
9107
|
|
|
9075
|
-
const version = "3.3.
|
|
9108
|
+
const version = "3.3.9";
|
|
9076
9109
|
const ssrUtils = null;
|
|
9077
9110
|
const resolveFilter = null;
|
|
9078
9111
|
const compatUtils = null;
|
|
@@ -10217,21 +10250,20 @@ const vModelText = {
|
|
|
10217
10250
|
el[assignKey] = getModelAssigner(vnode);
|
|
10218
10251
|
if (el.composing)
|
|
10219
10252
|
return;
|
|
10253
|
+
const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value;
|
|
10254
|
+
const newValue = value == null ? "" : value;
|
|
10255
|
+
if (elValue === newValue) {
|
|
10256
|
+
return;
|
|
10257
|
+
}
|
|
10220
10258
|
if (document.activeElement === el && el.type !== "range") {
|
|
10221
10259
|
if (lazy) {
|
|
10222
10260
|
return;
|
|
10223
10261
|
}
|
|
10224
|
-
if (trim && el.value.trim() ===
|
|
10225
|
-
return;
|
|
10226
|
-
}
|
|
10227
|
-
if ((number || el.type === "number") && looseToNumber(el.value) === value) {
|
|
10262
|
+
if (trim && el.value.trim() === newValue) {
|
|
10228
10263
|
return;
|
|
10229
10264
|
}
|
|
10230
10265
|
}
|
|
10231
|
-
|
|
10232
|
-
if (el.value !== newValue) {
|
|
10233
|
-
el.value = newValue;
|
|
10234
|
-
}
|
|
10266
|
+
el.value = newValue;
|
|
10235
10267
|
}
|
|
10236
10268
|
};
|
|
10237
10269
|
const vModelCheckbox = {
|