mirror of
https://github.com/wahyd4/vuepress.git
synced 2026-08-09 21:36:16 +10:00
- fix($core): markdown slot doesn‘t work. (regression of c85f62d)
- docs: fresh Node.JS API.
- test: official plugins.
20 lines
437 B
JavaScript
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 }})
|
|
}
|
|
}
|
|
}
|