Skip to content

Conversation

@CaedmonW
Copy link
Collaborator

这个 PR 做了什么? (简要描述所做更改)

动态引入时,间接使用Icon的用法

这个 PR 是什么类型? (至少选择一个)

  • 错误修复(Bugfix) fix #{issue id}
  • 新功能(Feature) resolve #{issue id}
  • 代码重构(Refactor)
  • 文档修改(Docs)
  • 代码风格更新(Code style update)
  • 类型描述更新(TypeScript definition update)
  • 其他,请描述(Other, please describe):

这个 PR 涉及以下平台:

  • 未涉及平台修改
  • 所有小程序
  • 微信小程序
  • 支付宝小程序
  • 百度小程序
  • 字节跳动小程序
  • QQ 轻应用
  • 京东小程序
  • 快应用平台(QuickApp)
  • Web 平台(H5)
  • 移动端(React-Native)

@auto-assign auto-assign bot requested a review from onlychild February 13, 2023 06:53
@changeset-bot
Copy link

changeset-bot bot commented Feb 13, 2023

🦋 Changeset detected

Latest commit: 1d7a61f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
ossa-doc Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Feb 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
ossa-demo ✅ Ready (Inspect) Visit Preview Feb 13, 2023 at 6:53AM (UTC)
ossa-doc ✅ Ready (Inspect) Visit Preview Feb 13, 2023 at 6:53AM (UTC)

Copy link
Collaborator

Choose a reason for hiding this comment

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

那这样我们不是要在每一个使用到icon的组件都引入一次?是不是可以增加一个plugin完成这项工作,检测到tsx中有引入icon,就自动引入呢?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

主要是因为Icon的样式文件比较大,如果使用者没有使用到Icon,那引入Icon的样式文件会对包体积不友好,拿Button举例,如果没有使用到带IconButton,其实可以不引入Icon的scss文件。


感觉plugin的想法可行,检测到有带icon属性的OsXXX时,引入icon的样式文件

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants