-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
code 展开的代码文件直接展示组件代码,而不是使用代码 #1868
Comments
提供最小可复现仓库 |
|
遇到同样的问题,通过下面方式书写时,demo 正常渲染,但是demo的源文件并非 预期行为:demo 展开的源文件应当仅包含
|
这个不是正确用法,会把组件源码也带到 demo 源码里,dumi 的最佳实践是从包名引入:https://d.umijs.org/guide/write-demo#%E5%A6%82%E4%BD%95%E5%BC%95%E5%85%A5%E7%BB%84%E4%BB%B6 |
调整成从包名导入后正常了,感谢👍 |
多谢,从包名导入后正常了 |
Question
code 对应的直接展示了 Boo 组件的代码了,没有 demo 文件
期望两种都能展示 demo 文件
只有 jsx 方式引入的展示了 demo 文件的代码
Sample Code
index.md 文件
demo.tsx文件
index.tsx文件
The text was updated successfully, but these errors were encountered: