Skip to content

Commit d72c687

Browse files
author
Guillaume Chau
committed
fix: $refs vue components
1 parent 311808a commit d72c687

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/util.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,16 @@ export function getCustomRefDetails (instance, key, ref) {
274274
if (Array.isArray(ref)) {
275275
value = ref.map((r) => getCustomRefDetails(instance, key, r)).map(data => data.value)
276276
} else {
277+
let name
278+
if (ref._isVue) {
279+
name = getComponentName(ref.$options)
280+
} else {
281+
name = ref.tagName.toLowerCase()
282+
}
283+
277284
value = {
278285
_custom: {
279-
display: `<${ref.tagName.toLowerCase()}` +
286+
display: `<${name}` +
280287
(ref.id ? ` <span class="attr-title">id</span>="${ref.id}"` : '') +
281288
(ref.className ? ` <span class="attr-title">class</span>="${ref.className}"` : '') + '&gt;',
282289
uid: instance.__VUE_DEVTOOLS_UID__,

0 commit comments

Comments
 (0)