Closed mkantautas closed 5 years ago
Sorry, I don't know Vue at all (though it's somewhere on my list of things to learn), so I don't think I can really help too much here. renderjson()
returns a DOM tree and not raw HTML, so maybe v-html
isn't right? That's a total guess!
You are correct @caldwell , v-html "Expects" string: https://vuejs.org/v2/api/#v-html So he cannot use that template directive.
@neorganic you need to create your own component and perhaps use the render function: https://vuejs.org/v2/guide/render-function.html
It should work fine with vue as far as I understand.
works with using this.$el.appendChild(renderjson(as demo in this project))
in mounted
hook
Pulled it via npm. // importing
import renderjson from 'renderjson/renderjson'
// template<div v-html="performance_report" v-if="performance_report" > </div>
// executing on mount