[Vuejs]-Appending and render a Vue component using js

0👍

My first reaction was "you shouldn’t be directly manipulating the DOM or constructing HTML strings" (or else why are you using Vue?), but you’re using JqxGrid which appears to function this way (I’m not familiar with JqxGrid).

In any case, what you’re trying to render isn’t strictly HTML, it’s a Vue template string which requires compilation to a JavaScript render function (see Vue.compile()). And even if you do manage to do that, I’m not sure it’ll work with JqxGrid.

This is something that really should be done by JqxGrid by using scoped slots. If JqxGrid cannot support rendering Vue components like this, then I’m afraid you’re out of luck.

Leave a comment