vite-plugin-vue-devtools 1.0.0-alpha.2 → 1.0.0-beta.1
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/README.md +29 -11
- package/README.zh-CN.md +185 -0
- package/dist/client/assets/{Icon.vue_vue_type_script_setup_true_lang-9344440e.js → Icon.vue_vue_type_script_setup_true_lang-7b574e17.js} +1 -1
- package/dist/client/assets/{IconButton.vue_vue_type_script_setup_true_lang-f308a32e.js → IconButton.vue_vue_type_script_setup_true_lang-df1aed4a.js} +2 -2
- package/dist/client/assets/{IconTitle.vue_vue_type_script_setup_true_lang-4cf300a8.js → IconTitle.vue_vue_type_script_setup_true_lang-340f9637.js} +1 -1
- package/dist/client/assets/{IframeView.vue_vue_type_script_setup_true_lang-a998c802.js → IframeView.vue_vue_type_script_setup_true_lang-26b984e0.js} +1 -1
- package/dist/client/assets/{PanelGrids-bf67e36d.js → PanelGrids-79045561.js} +1 -1
- package/dist/client/assets/{SectionBlock-30cd0db7.js → SectionBlock-d6546a5c.js} +3 -3
- package/dist/client/assets/{StateFields.vue_vue_type_script_setup_true_lang-f232f911.js → StateFields.vue_vue_type_script_setup_true_lang-87cd4432.js} +4 -4
- package/dist/client/assets/{Switch.vue_vue_type_script_setup_true_lang-ff441d43.js → Switch.vue_vue_type_script_setup_true_lang-e9fc0dc8.js} +2 -2
- package/dist/client/assets/{TextInput.vue_vue_type_script_setup_true_lang-49fa3d66.js → TextInput.vue_vue_type_script_setup_true_lang-c719d9ea.js} +2 -2
- package/dist/client/assets/{__eyedropper-04974bae.js → __eyedropper-9c607201.js} +3 -3
- package/dist/client/assets/{assets-103b7b87.js → assets-6d3c029f.js} +16 -20
- package/dist/client/assets/{component-docs-c0980d29.js → component-docs-a9751a4b.js} +4 -4
- package/dist/client/assets/{components-4ea0f479.js → components-b5374f38.js} +8 -400
- package/dist/client/assets/data-8705dbff.js +396 -0
- package/dist/client/assets/dayjs.min-52f29994.js +13 -0
- package/dist/client/assets/{documentations-81489cc3.js → documentations-c72e57d5.js} +2 -2
- package/dist/client/assets/{graph-3ab96556.js → graph-28ffd27f.js} +81 -46
- package/dist/client/assets/index-43ac0c1e.js +70738 -0
- package/dist/client/assets/{index-d3dcbe9e.css → index-b16c49d4.css} +2 -1
- package/dist/client/assets/{index-cc695468.js → index-cdabf7ff.js} +1 -1
- package/dist/client/assets/{inspect-a4a1ccce.js → inspect-ce9eb51a.js} +2 -2
- package/dist/client/assets/{npm-d82cc33a.js → npm-307e966b.js} +5 -6
- package/dist/client/assets/{overview-62088e28.js → overview-5ce230b6.js} +4 -4
- package/dist/client/assets/{pages-b69a68f5.js → pages-ce469168.js} +5 -5
- package/dist/client/assets/{pinia-f806031f.js → pinia-309a64ad.js} +6 -6
- package/dist/client/assets/rerender-trace-6c5229c1.css +14 -0
- package/dist/client/assets/rerender-trace-b0a16930.js +369 -0
- package/dist/client/assets/{routes-06a1de65.js → routes-fef0d125.js} +7 -7
- package/dist/client/assets/{settings-a01dd288.js → settings-d650aa71.js} +6 -7
- package/dist/client/assets/{splitpanes.es-87d8571e.js → splitpanes.es-a1996dda.js} +1 -1
- package/dist/client/assets/{timeline-4af72c7c.js → timeline-881ae377.js} +8 -18
- package/dist/client/index.html +2 -2
- package/dist/vite.cjs +18 -7
- package/dist/vite.d.ts +10 -0
- package/dist/vite.mjs +19 -8
- package/package.json +2 -2
- package/src/views/composables.ts +2 -3
- package/dist/client/assets/_commonjsHelpers-65004790.js +0 -37
- package/dist/client/assets/index-773a455a.js +0 -18422
|
@@ -1,100 +1,11 @@
|
|
|
1
|
-
import { _ as __unplugin_components_0 } from './PanelGrids-
|
|
2
|
-
import {
|
|
3
|
-
import { a as _sfc_main$2, _ as _sfc_main$3 } from './StateFields.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import {
|
|
5
|
-
import './
|
|
6
|
-
import './
|
|
7
|
-
import './
|
|
8
|
-
|
|
9
|
-
function isBeingDestroyed(instance) {
|
|
10
|
-
return instance._isBeingDestroyed || instance.isUnmounted;
|
|
11
|
-
}
|
|
12
|
-
function isFragment(instance) {
|
|
13
|
-
return Fragment === instance.subTree?.type;
|
|
14
|
-
}
|
|
15
|
-
function getInstanceName(instance) {
|
|
16
|
-
const name = getComponentTypeName(instance.type || {});
|
|
17
|
-
if (name)
|
|
18
|
-
return name;
|
|
19
|
-
if (instance.root === instance)
|
|
20
|
-
return "Root";
|
|
21
|
-
for (const key in instance.parent?.type?.components) {
|
|
22
|
-
if (instance.parent.type.components[key] === instance.type)
|
|
23
|
-
return saveComponentName(instance, key);
|
|
24
|
-
}
|
|
25
|
-
for (const key in instance.appContext?.components) {
|
|
26
|
-
if (instance.appContext.components[key] === instance.type)
|
|
27
|
-
return saveComponentName(instance, key);
|
|
28
|
-
}
|
|
29
|
-
const fileName = getComponentFileName(instance.type || {});
|
|
30
|
-
if (fileName)
|
|
31
|
-
return fileName;
|
|
32
|
-
return "Anonymous Component";
|
|
33
|
-
}
|
|
34
|
-
function saveComponentName(instance, key) {
|
|
35
|
-
return key;
|
|
36
|
-
}
|
|
37
|
-
function getComponentTypeName(options) {
|
|
38
|
-
return options.name || options._componentTag || options.__vdevtools_guessedName || options.__name;
|
|
39
|
-
}
|
|
40
|
-
function getComponentFileName(options) {
|
|
41
|
-
const file = options.__file;
|
|
42
|
-
if (file) {
|
|
43
|
-
const filename = options.__file?.match(/\/?([^/]+?)(\.[^/.]+)?$/)?.[1];
|
|
44
|
-
return filename ?? file;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
function getUniqueComponentId(instance) {
|
|
48
|
-
const appId = "vue-devtools";
|
|
49
|
-
const instanceId = instance === instance.root ? "root" : instance.uid;
|
|
50
|
-
return `${appId}:${instanceId}`;
|
|
51
|
-
}
|
|
52
|
-
function getRenderKey(value) {
|
|
53
|
-
if (value == null)
|
|
54
|
-
return null;
|
|
55
|
-
const type = typeof value;
|
|
56
|
-
if (type === "number")
|
|
57
|
-
return value;
|
|
58
|
-
else if (type === "string")
|
|
59
|
-
return `'${value}'`;
|
|
60
|
-
else if (Array.isArray(value))
|
|
61
|
-
return "Array";
|
|
62
|
-
else
|
|
63
|
-
return "Object";
|
|
64
|
-
}
|
|
65
|
-
function cached(fn) {
|
|
66
|
-
const cache = /* @__PURE__ */ Object.create(null);
|
|
67
|
-
return function cachedFn(str) {
|
|
68
|
-
const hit = cache[str];
|
|
69
|
-
return hit || (cache[str] = fn(str));
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
function toUpper(_, c) {
|
|
73
|
-
return c ? c.toUpperCase() : "";
|
|
74
|
-
}
|
|
75
|
-
const camelizeRE = /-(\w)/g;
|
|
76
|
-
const camelize = cached((str) => {
|
|
77
|
-
return str && str.replace(camelizeRE, toUpper);
|
|
78
|
-
});
|
|
79
|
-
const kebabizeRE = /([a-z0-9])([A-Z])/g;
|
|
80
|
-
const kebabize = cached((str) => {
|
|
81
|
-
return str && str.replace(kebabizeRE, (_, lowerCaseCharacter, upperCaseLetter) => {
|
|
82
|
-
return `${lowerCaseCharacter}-${upperCaseLetter}`;
|
|
83
|
-
}).toLowerCase();
|
|
84
|
-
});
|
|
85
|
-
function returnError(cb) {
|
|
86
|
-
try {
|
|
87
|
-
return cb();
|
|
88
|
-
} catch (e) {
|
|
89
|
-
return e;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
const classifyRE = /(?:^|[-_/])(\w)/g;
|
|
93
|
-
const classify = cached((str) => {
|
|
94
|
-
return str && `${str}`.replace(classifyRE, toUpper);
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
/* Injected with object hook! */
|
|
1
|
+
import { _ as __unplugin_components_0 } from './PanelGrids-79045561.js';
|
|
2
|
+
import { a$ as ref, a1 as computed, b8 as shallowRef, c8 as useDevToolsClient, cu as useThrottleFn, v as defineComponent, r as resolveComponent, o as openBlock, e as createElementBlock, x as createBaseVNode, z as unref, c as createBlock, q as normalizeClass, y as toDisplayString, l as normalizeStyle, F as Fragment, i as renderList, g as createCommentVNode, aP as onMounted, cv as onVueInstanceUpdate, u as createVNode, h as withCtx, c9 as rootPath, aZ as reactive, _ as __unplugin_components_7, cw as instance } from './index-43ac0c1e.js';
|
|
3
|
+
import { a as _sfc_main$2, _ as _sfc_main$3 } from './StateFields.vue_vue_type_script_setup_true_lang-87cd4432.js';
|
|
4
|
+
import { a as getInstanceName, c as classify, k as kebabize, i as isFragment, b as isBeingDestroyed, d as getUniqueComponentId, e as getRenderKey, f as getInstanceState, h as getInstanceDetails } from './data-8705dbff.js';
|
|
5
|
+
import { g, M } from './splitpanes.es-a1996dda.js';
|
|
6
|
+
import './Icon.vue_vue_type_script_setup_true_lang-7b574e17.js';
|
|
7
|
+
import './index-cdabf7ff.js';
|
|
8
|
+
import './IconButton.vue_vue_type_script_setup_true_lang-df1aed4a.js';
|
|
98
9
|
|
|
99
10
|
class ComponentFilter {
|
|
100
11
|
filter;
|
|
@@ -221,309 +132,6 @@ function addIframePosition(bounds, win) {
|
|
|
221
132
|
|
|
222
133
|
/* Injected with object hook! */
|
|
223
134
|
|
|
224
|
-
const vueBuiltins = [
|
|
225
|
-
"nextTick",
|
|
226
|
-
"defineComponent",
|
|
227
|
-
"defineAsyncComponent",
|
|
228
|
-
"defineCustomElement",
|
|
229
|
-
"ref",
|
|
230
|
-
"computed",
|
|
231
|
-
"reactive",
|
|
232
|
-
"readonly",
|
|
233
|
-
"watchEffect",
|
|
234
|
-
"watchPostEffect",
|
|
235
|
-
"watchSyncEffect",
|
|
236
|
-
"watch",
|
|
237
|
-
"isRef",
|
|
238
|
-
"unref",
|
|
239
|
-
"toRef",
|
|
240
|
-
"toRefs",
|
|
241
|
-
"isProxy",
|
|
242
|
-
"isReactive",
|
|
243
|
-
"isReadonly",
|
|
244
|
-
"shallowRef",
|
|
245
|
-
"triggerRef",
|
|
246
|
-
"customRef",
|
|
247
|
-
"shallowReactive",
|
|
248
|
-
"shallowReadonly",
|
|
249
|
-
"toRaw",
|
|
250
|
-
"markRaw",
|
|
251
|
-
"effectScope",
|
|
252
|
-
"getCurrentScope",
|
|
253
|
-
"onScopeDispose",
|
|
254
|
-
"onMounted",
|
|
255
|
-
"onUpdated",
|
|
256
|
-
"onUnmounted",
|
|
257
|
-
"onBeforeMount",
|
|
258
|
-
"onBeforeUpdate",
|
|
259
|
-
"onBeforeUnmount",
|
|
260
|
-
"onErrorCaptured",
|
|
261
|
-
"onRenderTracked",
|
|
262
|
-
"onRenderTriggered",
|
|
263
|
-
"onActivated",
|
|
264
|
-
"onDeactivated",
|
|
265
|
-
"onServerPrefetch",
|
|
266
|
-
"provide",
|
|
267
|
-
"inject",
|
|
268
|
-
"h",
|
|
269
|
-
"mergeProps",
|
|
270
|
-
"cloneVNode",
|
|
271
|
-
"isVNode",
|
|
272
|
-
"resolveComponent",
|
|
273
|
-
"resolveDirective",
|
|
274
|
-
"withDirectives",
|
|
275
|
-
"withModifiers"
|
|
276
|
-
];
|
|
277
|
-
function getInstanceDetails(instance) {
|
|
278
|
-
return {
|
|
279
|
-
id: getUniqueComponentId(instance),
|
|
280
|
-
name: getInstanceName(instance),
|
|
281
|
-
file: instance?.type?.__file,
|
|
282
|
-
state: getInstanceState(instance)
|
|
283
|
-
};
|
|
284
|
-
}
|
|
285
|
-
function getInstanceState(instance) {
|
|
286
|
-
const mergedType = resolveMergedOptions(instance);
|
|
287
|
-
return processProps(instance).concat(
|
|
288
|
-
processState(instance),
|
|
289
|
-
processSetupState(instance),
|
|
290
|
-
processComputed(instance, mergedType),
|
|
291
|
-
processAttrs(instance),
|
|
292
|
-
processProvide(instance),
|
|
293
|
-
processInject(instance, mergedType),
|
|
294
|
-
processRefs(instance),
|
|
295
|
-
processEventListeners(instance)
|
|
296
|
-
);
|
|
297
|
-
}
|
|
298
|
-
function processProps(instance) {
|
|
299
|
-
const propsData = [];
|
|
300
|
-
const propDefinitions = instance.type.props;
|
|
301
|
-
for (let key in instance.props) {
|
|
302
|
-
const propDefinition = propDefinitions ? propDefinitions[key] : null;
|
|
303
|
-
key = camelize(key);
|
|
304
|
-
propsData.push({
|
|
305
|
-
type: "props",
|
|
306
|
-
key,
|
|
307
|
-
value: returnError(() => instance.props[key]),
|
|
308
|
-
meta: propDefinition ? {
|
|
309
|
-
type: propDefinition.type ? getPropType(propDefinition.type) : "any",
|
|
310
|
-
required: !!propDefinition.required,
|
|
311
|
-
...propDefinition.default != null ? { default: propDefinition.default.toString() } : {}
|
|
312
|
-
} : {
|
|
313
|
-
type: "invalid"
|
|
314
|
-
},
|
|
315
|
-
editable: false
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
return propsData;
|
|
319
|
-
}
|
|
320
|
-
const fnTypeRE = /^(?:function|class) (\w+)/;
|
|
321
|
-
function getPropType(type) {
|
|
322
|
-
if (Array.isArray(type))
|
|
323
|
-
return type.map((t) => getPropType(t)).join(" or ");
|
|
324
|
-
if (type == null)
|
|
325
|
-
return "null";
|
|
326
|
-
const match = type.toString().match(fnTypeRE);
|
|
327
|
-
return typeof type === "function" ? match && match[1] || "any" : "any";
|
|
328
|
-
}
|
|
329
|
-
function processState(instance) {
|
|
330
|
-
const type = instance.type;
|
|
331
|
-
const props = type.props;
|
|
332
|
-
const getters = type.vuex && type.vuex.getters;
|
|
333
|
-
const computedDefs = type.computed;
|
|
334
|
-
const data = {
|
|
335
|
-
...instance.data,
|
|
336
|
-
...instance.renderContext
|
|
337
|
-
};
|
|
338
|
-
return Object.keys(data).filter((key) => !(props && key in props) && !(getters && key in getters) && !(computedDefs && key in computedDefs)).map((key) => ({
|
|
339
|
-
key,
|
|
340
|
-
type: "data",
|
|
341
|
-
value: returnError(() => data[key]),
|
|
342
|
-
editable: true
|
|
343
|
-
}));
|
|
344
|
-
}
|
|
345
|
-
function processSetupState(instance) {
|
|
346
|
-
const raw = instance.devtoolsRawSetupState || {};
|
|
347
|
-
return Object.keys(instance.setupState).filter((key) => !vueBuiltins.includes(key) && key.split(/(?=[A-Z])/)[0] !== "use").map((key) => {
|
|
348
|
-
const value = returnError(() => toRaw(instance.setupState[key]));
|
|
349
|
-
const rawData = raw[key];
|
|
350
|
-
let result;
|
|
351
|
-
let isOther = typeof value === "function" || typeof value?.render === "function" || typeof value?.__asyncLoader === "function";
|
|
352
|
-
if (rawData) {
|
|
353
|
-
const info = getSetupStateInfo(rawData);
|
|
354
|
-
const objectType = info.computed ? "Computed" : info.ref ? "Ref" : info.reactive ? "Reactive" : null;
|
|
355
|
-
const isState = info.ref || info.computed || info.reactive;
|
|
356
|
-
const raw2 = rawData.effect?.raw?.toString() || rawData.effect?.fn?.toString();
|
|
357
|
-
if (objectType)
|
|
358
|
-
isOther = false;
|
|
359
|
-
result = {
|
|
360
|
-
...objectType ? { objectType } : {},
|
|
361
|
-
...raw2 ? { raw: raw2 } : {},
|
|
362
|
-
editable: isState && !info.readonly
|
|
363
|
-
};
|
|
364
|
-
}
|
|
365
|
-
const type = isOther ? "setup (other)" : "setup";
|
|
366
|
-
return {
|
|
367
|
-
key,
|
|
368
|
-
value,
|
|
369
|
-
type,
|
|
370
|
-
...result
|
|
371
|
-
};
|
|
372
|
-
});
|
|
373
|
-
}
|
|
374
|
-
function isRef(raw) {
|
|
375
|
-
return !!raw.__v_isRef;
|
|
376
|
-
}
|
|
377
|
-
function isComputed(raw) {
|
|
378
|
-
return isRef(raw) && !!raw.effect;
|
|
379
|
-
}
|
|
380
|
-
function isReactive(raw) {
|
|
381
|
-
return !!raw.__v_isReactive;
|
|
382
|
-
}
|
|
383
|
-
function isReadOnly(raw) {
|
|
384
|
-
return !!raw.__v_isReadonly;
|
|
385
|
-
}
|
|
386
|
-
function toRaw(value) {
|
|
387
|
-
if (value?.__v_raw)
|
|
388
|
-
return value.__v_raw;
|
|
389
|
-
return value;
|
|
390
|
-
}
|
|
391
|
-
function getSetupStateInfo(raw) {
|
|
392
|
-
return {
|
|
393
|
-
ref: isRef(raw),
|
|
394
|
-
computed: isComputed(raw),
|
|
395
|
-
reactive: isReactive(raw),
|
|
396
|
-
readonly: isReadOnly(raw)
|
|
397
|
-
};
|
|
398
|
-
}
|
|
399
|
-
function processComputed(instance, mergedType) {
|
|
400
|
-
const type = mergedType;
|
|
401
|
-
const computed = [];
|
|
402
|
-
const defs = type.computed || {};
|
|
403
|
-
for (const key in defs) {
|
|
404
|
-
const def = defs[key];
|
|
405
|
-
const type2 = typeof def === "function" && def.vuex ? "vuex bindings" : "computed";
|
|
406
|
-
computed.push({
|
|
407
|
-
type: type2,
|
|
408
|
-
key,
|
|
409
|
-
value: returnError(() => instance.proxy[key]),
|
|
410
|
-
editable: typeof def.set === "function"
|
|
411
|
-
});
|
|
412
|
-
}
|
|
413
|
-
return computed;
|
|
414
|
-
}
|
|
415
|
-
function processAttrs(instance) {
|
|
416
|
-
return Object.keys(instance.attrs).map((key) => ({
|
|
417
|
-
type: "attrs",
|
|
418
|
-
key,
|
|
419
|
-
value: returnError(() => instance.attrs[key])
|
|
420
|
-
}));
|
|
421
|
-
}
|
|
422
|
-
function processProvide(instance) {
|
|
423
|
-
return Reflect.ownKeys(instance.provides).map((key) => ({
|
|
424
|
-
type: "provided",
|
|
425
|
-
key: key.toString(),
|
|
426
|
-
value: returnError(() => instance.provides[key])
|
|
427
|
-
}));
|
|
428
|
-
}
|
|
429
|
-
function processInject(instance, mergedType) {
|
|
430
|
-
if (!mergedType?.inject)
|
|
431
|
-
return [];
|
|
432
|
-
let keys = [];
|
|
433
|
-
let defaultValue;
|
|
434
|
-
if (Array.isArray(mergedType.inject)) {
|
|
435
|
-
keys = mergedType.inject.map((key) => ({
|
|
436
|
-
key,
|
|
437
|
-
originalKey: key
|
|
438
|
-
}));
|
|
439
|
-
} else {
|
|
440
|
-
keys = Reflect.ownKeys(mergedType.inject).map((key) => {
|
|
441
|
-
const value = mergedType.inject[key];
|
|
442
|
-
let originalKey;
|
|
443
|
-
if (typeof value === "string" || typeof value === "symbol") {
|
|
444
|
-
originalKey = value;
|
|
445
|
-
} else {
|
|
446
|
-
originalKey = value.from;
|
|
447
|
-
defaultValue = value.default;
|
|
448
|
-
}
|
|
449
|
-
return {
|
|
450
|
-
key,
|
|
451
|
-
originalKey
|
|
452
|
-
};
|
|
453
|
-
});
|
|
454
|
-
}
|
|
455
|
-
return keys.map(({ key, originalKey }) => ({
|
|
456
|
-
type: "injected",
|
|
457
|
-
key: originalKey && key !== originalKey ? `${originalKey.toString()} ➞ ${key.toString()}` : key.toString(),
|
|
458
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
459
|
-
value: returnError(() => instance.ctx.hasOwnProperty(key) ? instance.ctx[key] : instance.provides.hasOwnProperty(originalKey) ? instance.provides[originalKey] : defaultValue)
|
|
460
|
-
}));
|
|
461
|
-
}
|
|
462
|
-
function processRefs(instance) {
|
|
463
|
-
return Object.keys(instance.refs).map((key) => ({
|
|
464
|
-
type: "refs",
|
|
465
|
-
key,
|
|
466
|
-
value: returnError(() => instance.refs[key])
|
|
467
|
-
}));
|
|
468
|
-
}
|
|
469
|
-
function processEventListeners(instance) {
|
|
470
|
-
const emitsDefinition = instance.type.emits;
|
|
471
|
-
const declaredEmits = Array.isArray(emitsDefinition) ? emitsDefinition : Object.keys(emitsDefinition ?? {});
|
|
472
|
-
const keys = Object.keys(instance.vnode.props ?? {});
|
|
473
|
-
const result = [];
|
|
474
|
-
for (const key of keys) {
|
|
475
|
-
const [prefix, ...eventNameParts] = key.split(/(?=[A-Z])/);
|
|
476
|
-
if (prefix === "on") {
|
|
477
|
-
const eventName = eventNameParts.join("-").toLowerCase();
|
|
478
|
-
const isDeclared = declaredEmits.includes(eventName);
|
|
479
|
-
result.push({
|
|
480
|
-
type: "event listeners",
|
|
481
|
-
key: eventName,
|
|
482
|
-
value: {
|
|
483
|
-
_custom: {
|
|
484
|
-
display: isDeclared ? "✅ Declared" : "⚠️ Not declared",
|
|
485
|
-
tooltip: !isDeclared ? `The event <code>${eventName}</code> is not declared in the <code>emits</code> option. It will leak into the component's attributes (<code>$attrs</code>).` : null
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
});
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
return result;
|
|
492
|
-
}
|
|
493
|
-
function resolveMergedOptions(instance) {
|
|
494
|
-
const raw = instance.type;
|
|
495
|
-
const { mixins, extends: extendsOptions } = raw;
|
|
496
|
-
const globalMixins = instance.appContext.mixins;
|
|
497
|
-
if (!globalMixins.length && !mixins && !extendsOptions)
|
|
498
|
-
return raw;
|
|
499
|
-
const options = {};
|
|
500
|
-
globalMixins.forEach((m) => mergeOptions(options, m));
|
|
501
|
-
mergeOptions(options, raw);
|
|
502
|
-
return options;
|
|
503
|
-
}
|
|
504
|
-
function mergeOptions(to, from, instance) {
|
|
505
|
-
if (typeof from === "function")
|
|
506
|
-
from = from.options;
|
|
507
|
-
if (!from)
|
|
508
|
-
return to;
|
|
509
|
-
const { mixins, extends: extendsOptions } = from;
|
|
510
|
-
extendsOptions && mergeOptions(to, extendsOptions);
|
|
511
|
-
mixins && mixins.forEach(
|
|
512
|
-
(m) => mergeOptions(to, m)
|
|
513
|
-
);
|
|
514
|
-
for (const key of ["computed", "inject"]) {
|
|
515
|
-
if (Object.prototype.hasOwnProperty.call(from, key)) {
|
|
516
|
-
if (!to[key])
|
|
517
|
-
to[key] = from[key];
|
|
518
|
-
else
|
|
519
|
-
Object.assign(to[key], from[key]);
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
return to;
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
/* Injected with object hook! */
|
|
526
|
-
|
|
527
135
|
const InstanceMap = /* @__PURE__ */ new Map();
|
|
528
136
|
class ComponentWalker {
|
|
529
137
|
maxDepth;
|