vue-devtools not recognizing components manually appended to DOM & $mounted

Created on 13 Aug 2018  路  3Comments  路  Source: vuejs/vue-devtools

What problem does this feature solve?

Provide ability to debug manually appended & mounted components which is necessary in edge cases.

What does the proposed API look like?

import Mention from "./MentionSpan";

const ComponentClass = Vue.extend(Mention);
const instance = new ComponentClass({
   propsData: { id: result.id, removeFunction: this.
});
instance.$slots.default = [result.name];
instance.$mount();
vue-devtools.register(instance);

Most helpful comment

Just make sure to define a parent when creating the component instance:

const instance = new ComponentClass({
   propsData: { id: result.id, removeFunction: this.
  parent: this, // assuming you do this in e.g. mounted() or a component method
});

That's enough to make it appear.

All 3 comments

Just make sure to define a parent when creating the component instance:

const instance = new ComponentClass({
   propsData: { id: result.id, removeFunction: this.
  parent: this, // assuming you do this in e.g. mounted() or a component method
});

That's enough to make it appear.

Thank you so much!

Hum, this doesn't seems to work anymore :(

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bajzarpa picture bajzarpa  路  3Comments

davestewart picture davestewart  路  3Comments

yyx990803 picture yyx990803  路  3Comments

sithuaung picture sithuaung  路  4Comments

Gedminas picture Gedminas  路  3Comments