From: Guillaume Chau Date: Sat, 22 Aug 2020 14:40:04 +0000 (+0200) Subject: feat(devtools): expose setupState target object X-Git-Tag: v3.0.0-rc.8~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31b99a9139a32590187a2e4a50ad0654de0034a9;p=thirdparty%2Fvuejs%2Fcore.git feat(devtools): expose setupState target object --- diff --git a/packages/runtime-core/src/component.ts b/packages/runtime-core/src/component.ts index 8f770f5a23..c06b691b7b 100644 --- a/packages/runtime-core/src/component.ts +++ b/packages/runtime-core/src/component.ts @@ -258,6 +258,11 @@ export interface ComponentInternalInstance { * @internal */ setupState: Data + /** + * devtools access to additional info + * @internal + */ + devtoolsRawSetupState?: any /** * @internal */ @@ -549,6 +554,9 @@ export function handleSetupResult( } // setup returned bindings. // assuming a render function compiled from template is present. + if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) { + instance.devtoolsRawSetupState = setupResult + } instance.setupState = proxyRefs(setupResult) if (__DEV__) { exposeSetupStateOnRenderContext(instance)