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(Tag): support children props #445

Merged
merged 1 commit into from
Aug 14, 2024
Merged

Conversation

taninsist
Copy link
Contributor

@taninsist taninsist commented Aug 8, 2024

🤔 这个 PR 的性质是?

  • 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

🔗 相关 Issue

fix #411

相关PR
Tencent/tdesign-common#1864
TDesignOteam/tdesign-api#363

💡 需求背景和解决方案

  • API功能对齐Mobile Vue端
  • DOM 结构对齐小程序端
  • 改用 V2文件夹下样式
  • 官网示例代码&&演示示例对齐新视觉稿

📝 更新日志

  • feat(Tag): 新增 children 属性
  • feat(CheckTag): 新增 variant 属性

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

Copy link
Contributor

github-actions bot commented Aug 8, 2024

完成

src/tag/CheckTag.tsx Outdated Show resolved Hide resolved
src/tag/CheckTag.tsx Outdated Show resolved Hide resolved
src/tag/CheckTag.tsx Outdated Show resolved Hide resolved
Copy link
Collaborator

@HaixingOoO HaixingOoO left a comment

Choose a reason for hiding this comment

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

image

改成memo统一吧,然后forwardRef<refProps,checkTagProps>这样写类型就好了

src/tag/Tag.tsx Outdated Show resolved Hide resolved
Copy link
Collaborator

@HaixingOoO HaixingOoO left a comment

Choose a reason for hiding this comment

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

https://github.com/Tencent/tdesign-react/blob/develop/src/_util/parseTNode.ts

可以加一个这文件的,然后渲染一些content/children,后面()=>children也可以渐进式支持

@HaixingOoO
Copy link
Collaborator

HaixingOoO commented Aug 8, 2024

然后除了style文件夹的引入样式用js,其他文件都用ts/tsx,example文件夹下的文件也要改成tsx

src/tag/Tag.tsx Outdated Show resolved Hide resolved
.xac/project.yaml Outdated Show resolved Hide resolved
src/tag/CheckTag.tsx Outdated Show resolved Hide resolved
@HaixingOoO
Copy link
Collaborator

src/_util/parseTNode.ts有人加上去了,你可能要合并一下develop分支然后解决一下snap,没啥问题了
@anlyyao 大佬,这个你看看,没问题就可以合并了😀

@anlyyao
Copy link
Collaborator

anlyyao commented Aug 13, 2024

@taninsist rebase dev 处理下冲突、更新csr和ssr快照、邮箱换个人的

@taninsist taninsist force-pushed the feat/tag branch 3 times, most recently from 08c83af to 1f1c85e Compare August 14, 2024 02:20
src/tag/CheckTag.tsx Outdated Show resolved Hide resolved
src/tag/CheckTag.tsx Outdated Show resolved Hide resolved
src/_util/parseTNode.ts Outdated Show resolved Hide resolved
@anlyyao anlyyao changed the title Feat/tag feat(Tag): complete refactoring Aug 14, 2024
@anlyyao anlyyao changed the title feat(Tag): complete refactoring feat(Tag): support children props Aug 14, 2024
@anlyyao anlyyao merged commit 862c5d5 into Tencent:develop Aug 14, 2024
6 checks passed
@github-actions github-actions bot mentioned this pull request Aug 16, 2024
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.

【Tag组件升级】任务单
4 participants