Custom Rendering

Using Vuese's default rendering results directly in the document may not be suitable for all scenarios.

Requirements

No title, Props and other attributes should be changed from <h2> to <h3>.

Config

const md = require('markdown-it')()
    .use(require('markdown-it-vuese'), {
        vueseRe: /<\[vuese-h3\]\((.+)\)/i,
        ruleName: 'vuese-h3',
        useRender: (vueseRender) => {
            const renderRes = vueseRender.render()
            const genMd = key => `### ${key}\n${renderRes[key]}\n`

            return Object.keys(renderRes).map(genMd).join('')
        },
    })

Markdown

<[vuese-h3](@/test/MyComponent.vue)

Notice that we add a new vuese rule.

Result

props

Name Description Type Required Default
name The name of the form, up to 8 characters String / Number true -

slots

Name Description Default Slot Content
header Form header <th>title</th>

events

Event Name Description Parameters
onclear Fire when the form is cleared The argument is a boolean value representing xxx

methods

Method Description Parameters
clear Used to manually clear the form -