From 7dbc3d1e93c8e366a32d006b82b55c67c1203ef1 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Thu, 10 Aug 2023 14:24:49 +0200 Subject: [PATCH] feat(components): show dependencies and dependents in component details related https://github.com/nuxt/devtools/issues/358 --- .../client/components/ComponentDetails.vue | 33 +++++++++++++++++-- .../client/components/ComponentItem.vue | 23 +++++++++++-- .../client/components/ComponentsGraph.vue | 29 ++++++++++++---- .../client/components/ComponentsList.vue | 29 +++++++++++++--- .../client/pages/modules/components.vue | 2 ++ 5 files changed, 101 insertions(+), 15 deletions(-) diff --git a/packages/devtools/client/components/ComponentDetails.vue b/packages/devtools/client/components/ComponentDetails.vue index bd27c9a88..820528643 100644 --- a/packages/devtools/client/components/ComponentDetails.vue +++ b/packages/devtools/client/components/ComponentDetails.vue @@ -4,6 +4,8 @@ import { pascalCase } from 'scule' const props = defineProps<{ component: Component + dependencies?: string[] + dependents?: string[] }>() // @ts-expect-error types @@ -15,7 +17,7 @@ const copy = useCopy() diff --git a/packages/devtools/client/components/ComponentItem.vue b/packages/devtools/client/components/ComponentItem.vue index abb250542..1e60ce7d3 100644 --- a/packages/devtools/client/components/ComponentItem.vue +++ b/packages/devtools/client/components/ComponentItem.vue @@ -1,17 +1,28 @@