fix(vant-markdown-loader): 修复 demo 组件和其他组件重名导致的渲染异常 (#8348)
This commit is contained in:
@@ -27,13 +27,13 @@ function wrapper(content) {
|
||||
<script>
|
||||
${demoLinks
|
||||
.map((link) => {
|
||||
return `import ${camelize(path.basename(link, '.vue'))} from '${link}';`;
|
||||
return `import DemoCode${camelize(path.basename(link, '.vue'))} from '${link}';`;
|
||||
})
|
||||
.join('\n')}
|
||||
|
||||
export default {
|
||||
components: {
|
||||
${demoLinks.map((link) => camelize(path.basename(link, '.vue'))).join(',')}
|
||||
${demoLinks.map((link) => `DemoCode${camelize(path.basename(link, '.vue'))}`).join(',')}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
||||
Reference in New Issue
Block a user