代码拉取完成,页面将自动刷新
// 配置项
// https://vue-styleguidist.github.io/docs/Documenting.html#code-comments
const path = require('path')
module.exports = {
componentsRoot: 'src/components',
components: '**/mgs-[A-Za-z-]*.vue',
outDir: './docs',
defaultExamples: false,
apiOptions: {
alias: {
'@': path.resolve(__dirname, 'src'),
},
},
getDestFile: (file, config) => {
return path
.resolve(config.outDir, file.match('[a-zA-Z-]*.vue')[0])
.replace(/(.vue)$/, '.md')
},
templates: {
component: (renderedUsage, doc) => {
const { displayName, description, docsBlocks, tags, functional } =
doc
const { deprecated, author, since, version, see, link } = tags || {}
return `
---
title: ${displayName}
---
# ${deprecated ? `~~${displayName}~~` : displayName}
${deprecated ? `> **Deprecated** ${deprecated[0].description}\n` : ''}
${description ? '> ' + description : ''}
${functional ? renderedUsage.functionalTag : ''}
${author ? author.map(a => `Author: ${a.description}\n`) : ''}
${since ? `Since: ${since[0].description}\n` : ''}
${version ? `Version: ${version[0].description}\n` : ''}
${see ? see.map(s => `[See](${s.description})\n`) : ''}
${link ? link.map(l => `[See](${l.description})\n`) : ''}
<div class="api">
${renderedUsage.props}
${renderedUsage.methods}
${renderedUsage.events}
${renderedUsage.slots}
</div>
${docsBlocks ? '\n' + docsBlocks.join('\n---\n') : ''}
`
},
},
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。