Created
July 15, 2019 22:57
-
-
Save rebz/ef8eb47e4b7168a23c353371a913ba58 to your computer and use it in GitHub Desktop.
Vue VNode Constructor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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