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: tab.action&tab.extra #1339

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

feat: tab.action&tab.extra #1339

wants to merge 2 commits into from

Conversation

DBSDs
Copy link
Contributor

@DBSDs DBSDs commented Nov 29, 2022

🤔 这个变动的性质是?/ What is the nature of this change?

  • 新特性提交 / New feature
  • bug 修复 / Fix bug
  • 样式优化 / Style optimization
  • 代码风格优化 / Code style optimization
  • 性能优化 / Performance optimization
  • 构建优化 / Build optimization
  • 网站、文档、Demo 改进 / Website, documentation, demo improvements
  • 重构代码或样式 / Refactor code or style
  • 测试相关 / Test related
  • 其他 / Other

🔗 相关 Issue / Related Issue

💡 需求背景和解决方案 / Background or solution

ContentTabs 支持识别 Tab 上的子组件,

  • 渲染该 Tab 的 Action(最右侧)
  • Extra(紧跟 Tab)区域

📝 更新日志 / Changelog

Language Changelog
🇺🇸 English extends tab action & tab extra
🇨🇳 Chinese 拓展 tab 的 action 和extra

@vercel
Copy link

vercel bot commented Nov 29, 2022

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

Name Status Preview Updated
dumi ✅ Ready (Inspect) Visit Preview Dec 13, 2022 at 7:14AM (UTC)

Comment on lines 35 to 36
extra: require.resolve('./extra.tsx'),
action: require.resolve('./actions.tsx'),
Copy link
Member

Choose a reason for hiding this comment

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

TODO 里没说清楚…其实设想中这两个不是单独的组件,是 Tab 组件的 member exports,类型定义在这里:

components: {
default: ComponentType;
Extra: ComponentType;
Action: ComponentType;
};

feat: Tab component Extra & Action

fix: remove useless code

fix: remove useless code
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.

2 participants