Files
ULIVZandGitHub e5d8ed4655 feat: refine node api (#1395)
- fix($core): markdown slot doesn‘t work. (regression of c85f62d)
- docs: fresh Node.JS API.
- test: official plugins.
2019-03-04 23:46:13 +08:00

20 lines
437 B
JavaScript

const Component = {
props: ['name'],
render (h) {
return h('p', {
class: ['component', this.name]
}, this.name)
}
}
// When the child component is a pure presentation component,
// we want to be able to display a sub-component with minimal info,
// rather than stubbing it directly.
export default function mockComponent (name) {
return {
render (h) {
return h(Component, { props: { name }})
}
}
}