alexjoverm / v-runtime-template

Vue component for compiling templates on the fly using a v-html like API
MIT License
605 stars 70 forks source link

Pass props to the template #24

Closed wizbit closed 5 years ago

wizbit commented 5 years ago

Support passing an object to the runtime template to use as props. #22

alexjoverm commented 5 years ago

Hi @wizbit thanks a lot for the PR. Could you sync it up with the latest master? otherwise conflicts will happen

wizbit commented 5 years ago

Rebased to master

theianjohnson commented 5 years ago

@alexjoverm Any chance we can get this merged in? I'm looking for almost this exact feature, but this one will do for what I'm working on.

What I'm actually looking for is to be able to scope the <v-runtime-template> to only props passed in, and not let it have access to parent props, data, computed, etc - essentially sandboxing it.

I'm trying to see if I can use this flow to allow users to customize their own HTML, but let that HTML have access to white-listed variables, then harness Vue's renderer for not just variable replacement, but also it's v-if's and v-for's.

alexjoverm commented 5 years ago

Fixed by 1.9.0