File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<script setup lang="ts">
2+ import { useDevtoolsClient } from ' @nuxt/devtools-kit/iframe-client'
23import type { ComponentLazyLoadData , DirectImportInfo } from ' ../../../src/runtime/lazy-load/schema'
34import { LAZY_LOAD_ROUTE } from ' ../utils/routes'
45
@@ -9,6 +10,7 @@ definePageMeta({
910})
1011
1112const nuxtApp = useNuxtApp ()
13+ const devtoolsClient = useDevtoolsClient ()
1214
1315const entries = computed (() =>
1416 nuxtApp .$lazyLoadHints .value .filter (
@@ -80,10 +82,24 @@ async function dismiss(id: string) {
8082 <span class =" text-xs text-neutral-400 ml-1" >→ Lazy{{ imp.componentName }}</span >
8183 </td >
8284 <td class =" py-2 text-xs text-neutral-500 dark:text-neutral-400 truncate max-w-48" >
83- {{ imp.importSource }}
85+ <button
86+ type =" button"
87+ title =" open in editor"
88+ class =" cursor-pointer text-inherit underline bg-transparent border-0 p-0"
89+ @click =" devtoolsClient?.devtools.rpc.openInEditor(imp.importSource)"
90+ >
91+ {{ imp.importSource }}
92+ </button >
8493 </td >
8594 <td class =" py-2 text-xs text-neutral-500 dark:text-neutral-400 truncate max-w-48" >
86- {{ imp.importedBy }}
95+ <button
96+ type =" button"
97+ title =" open in editor"
98+ class =" cursor-pointer text-inherit underline bg-transparent border-0 p-0"
99+ @click =" devtoolsClient?.devtools.rpc.openInEditor(imp.importedBy)"
100+ >
101+ {{ imp.importedBy }}
102+ </button >
87103 </td >
88104 </tr >
89105 </tbody >
You can’t perform that action at this time.
0 commit comments