Skip to content
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

feat(doc): 新增codesandbox支持 #12332

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

LadyChatterleyLover
Copy link
Contributor

文档新增codesandbox支持,目前做了一个demo,修改了button和field的文档示例 。

@codecov-commenter
Copy link

codecov-commenter commented Sep 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

see 1 file with indirect coverage changes

📢 Thoughts on this report? Let us know!.

@@ -42,6 +42,7 @@
"@types/less": "^3.0.3",
"@types/lodash": "^4.14.191",
"@types/markdown-it": "^13.0.0",
"codesandbox": "^2.2.3",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个依赖让 lock 文件增加了 1600 行,而 Vant 仓库是希望严格控制依赖梳理的。

能否看一下是否有体积更小的依赖。。

@LadyChatterleyLover
Copy link
Contributor Author

LadyChatterleyLover commented Oct 2, 2023 via email

@chenjiahan
Copy link
Member

这个 PR 可以 review 了嘛?

@LadyChatterleyLover
Copy link
Contributor Author

LadyChatterleyLover commented Oct 13, 2023 via email

@chenjiahan chenjiahan self-requested a review October 14, 2023 01:18
@chenjiahan
Copy link
Member

看了下样式还有点粗糙,另外似乎没有把 template / scripts 放到同一个 codesandbox 里面,这两块能优化下吗

@LadyChatterleyLover
Copy link
Contributor Author

LadyChatterleyLover commented Oct 17, 2023 via email

@chenjiahan
Copy link
Member

ok,那样式可以等合并完我再优化下,另外「template / scripts 放到同一个 codesandbox 里面」的问题准备如何解决呢

@LadyChatterleyLover
Copy link
Contributor Author

LadyChatterleyLover commented Oct 22, 2023 via email

@LadyChatterleyLover
Copy link
Contributor Author

@chenjiahan
截屏2023-10-23 22 02 13
template和script的代码是在一个文件里面哈,「template / scripts 放到同一个 codesandbox 里面」具体是指什么呢?

@chenjiahan
Copy link
Member

可能是因为大部分组件的 template 和 scripts 是分开写在两个 code blocks 里的,而不是上图的合并成一个 code block

title: meta.title,
dependencies: {
vue: 'latest',
vant: 'latest',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vant CLI 是一个通用的组件库工具,所以代码里不能和 vant 包产生耦合,这种可以通过参数控制

vant: 'latest',
},
devDependencies: {
'@vue/cli-plugin-babel': '~4.5.0',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以换成 Vite 吗

@chenjiahan
Copy link
Member

是不是要加一个组件白名单呢,目前只有 button 和 cell 适配了,其他组件先不展示对应的 codesandbox 图标

@LadyChatterleyLover
Copy link
Contributor Author

LadyChatterleyLover commented Oct 24, 2023 via email

@LadyChatterleyLover
Copy link
Contributor Author

LadyChatterleyLover commented Oct 24, 2023 via email

@LadyChatterleyLover
Copy link
Contributor Author

LadyChatterleyLover commented Oct 24, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants