Skip to content

Commit

Permalink
call getUniqueComponentId for the inspectInstance
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinluo201 committed Dec 20, 2024
1 parent da5a86c commit 9e0746c
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions packages/devtools-kit/src/core/component-highlighter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { ComponentHighLighterOptions, ScrollToComponentOptions } from './ty
import { activeAppRecord } from '../../ctx'
import { getComponentBoundingRect } from '../component/state/bounding-rect'
import { getRootElementsFromComponentInstance } from '../component/tree/el'
import { getComponentId, getComponentInstance, getInstanceName } from '../component/utils'
import { getComponentInstance, getInstanceName, getUniqueComponentId } from '../component/utils'

export type * from './types'

Expand Down Expand Up @@ -180,14 +180,8 @@ function selectComponentFn(e: MouseEvent, cb) {
e.preventDefault()
e.stopPropagation()
if (inspectInstance) {
const app = activeAppRecord.value?.app as unknown as VueAppInstance
getComponentId({
app,
uid: app.uid,
instance: inspectInstance,
}).then((id) => {
cb(id)
})
const uniqueComponentId = getUniqueComponentId(inspectInstance)
cb(uniqueComponentId)
}
}

Expand Down

0 comments on commit 9e0746c

Please sign in to comment.