【发布时间】:2021-11-20 20:52:35
【问题描述】:
我使用的是 VuePress 版本:
"devDependencies": {
"vuepress": "^2.0.0-beta.26"
}
我无法将简单的 .vue 组件添加到我的 .md 页面。
我的 Github LINK
在这里尝试了其他解决方案,但似乎没有任何帮助: Solution1 Solution2
我正在关注官方VuePress documentation 关于组件的指南。但我得到的只是一个零大小的组件(没有显示内容)
非常感谢任何解决方案。
编辑:
使它比检查我的 github 更简单一些。无论如何,整个项目只包含 2 个文件。
所以我所做的就是在 .vuepress/components 中创建一个新的 component.vue 文件:
<template>
<h1>Hello from my test component</h1>
</template>
<script>
export default {}
</script>
<style></style>
并尝试将其添加到我的 README.md 文件中:
# Hello VuePress
### test component
<TestComponent />
<kebab-case-test-component />
我的文件夹树的屏幕截图:
【问题讨论】:
-
想添加一个codesanbox链接,但这就是不行。这是我的 github 链接:github.com/DariuszLegizynski/VuepressTest
标签: vue.js components vuepress