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

建议Tab中的title支持ReactNode #198

Closed
yujingwyh opened this issue Mar 8, 2022 · 3 comments
Closed

建议Tab中的title支持ReactNode #198

yujingwyh opened this issue Mar 8, 2022 · 3 comments

Comments

@yujingwyh
Copy link

yujingwyh commented Mar 8, 2022

您提出的功能是否和您遇到的问题有关,请描述该问题
标题栏需要展示小标签

您是否有建议的实现方案
title属性增加ReactNode支持

其它帮助我们理解您需求的描述、截图
image

@Banlangenn
Copy link
Contributor

代码里是支持的, 但是类型没有透出来

@yujingwyh
Copy link
Author

yujingwyh commented Mar 10, 2022

会有报错
微信小程序端

import {Text  } from "@tarojs/components";
import {Tab,Tabs } from "@antmjs/vantui";

export default () => {
  return (
    <Tabs>
      <Tab name={'key1'} title={<Text>title1</Text> as any}>
        1
      </Tab>
      <Tab name={'key2'} title={<Text>title2</Text> as any}>
        2
      </Tab>
   </Tabs>
  );
};

image

@Banlangenn
Copy link
Contributor

需要处理一下

hisanshao pushed a commit that referenced this issue Mar 28, 2022
* feat: 支持tab的title属性为ReactNode
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

No branches or pull requests

3 participants