Skip to content

Instantly share code, notes, and snippets.

@rebz
Created July 15, 2019 22:57
Show Gist options
  • Save rebz/ef8eb47e4b7168a23c353371a913ba58 to your computer and use it in GitHub Desktop.
Save rebz/ef8eb47e4b7168a23c353371a913ba58 to your computer and use it in GitHub Desktop.
Vue VNode Constructor
import Vue from 'vue';
import VNode from './VNode';
export default {
const VNodeArray = this.$slots.head;
const item = VNodeArray[0];
const DetailConstructor = Vue.extend(VNode);
const rendered = new DetailConstructor({
propsData: {
vnode: item,
},
}, 500);
rendered.$mount();
const el = rendered.$el;
}
export default {
functional: true,
render: (h, ctx) => ctx.props.vnode,
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment