@sterashima/vue-component-render
v0.0.1-alpha.5
Published
## example
Downloads
2
Readme
@sterashima78/vue-component-render
example
<meta charset="utf-8">
<title>vue-component-render demo</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/vuetify.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vuetify.js"></script>
<script src="./vue-component-render.umd.js"></script>
<div id="app"></div>
<script>
console.log(window["vue-component-render"])
const make = window["vue-component-render"].makeNodeTree
const converter = window["vue-component-render"].nodeDataConverterFactory()
const rendererFactory = window["vue-component-render"].nodeRenderFactory(converter)
const data = make(
{tag: "v-app"},
[make(
{tag: "v-main"},
[make(
{tag: "v-container"},
["Hello world"]
)]
)]
)
console.log(data)
const vue = new Vue({
el: '#app',
vuetify: new Vuetify(),
render(h){
const renderer = rendererFactory(h)
return renderer(data)
}
})
</script>