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

Tabs 支持给各部分 dom 添加 data-* #1648

Closed
missjing opened this issue Aug 8, 2017 · 6 comments
Closed

Tabs 支持给各部分 dom 添加 data-* #1648

missjing opened this issue Aug 8, 2017 · 6 comments
Assignees

Comments

@missjing
Copy link

missjing commented Aug 8, 2017

What problem does this feature solve?

在 Tracker 的埋点规则下,会在前端 dom 上埋一些属性 data-aspm/data-aspm-click/data-aspm-expo/data-aspm-param,目前在react一套下会使用到 antd-mobile 组件,但却不支持埋点属性,全部要手动Tracker.click的方式做很不人性。

What does the proposed API look like?

<Flex.Item className="earn"
               onClick={toProfitList}
               data-aspm-click={spm.dPos}
               data-aspm-expo>收益明细
</Flex.Item>
@ant-design-bot
Copy link

It will be better to write your issue/comment in English, so more people can understand you.
And this means that more people can help you or benefit from your issue/comment.
See: ant-design/ant-design#4897

@paranoidjk
Copy link
Contributor

大部分组件应该都支持了 data-*, 你有发现哪个组件不支持吗?

@paranoidjk
Copy link
Contributor

另外请确认 antd-mobile 版本,最新是 1.6.0

@missjing
Copy link
Author

missjing commented Aug 8, 2017

多谢,之前用的 1.0.0版本。升级到1.6.0就可以了~

@missjing
Copy link
Author

missjing commented Aug 8, 2017

本地测试发现 Tabs组件不支持data-*属性诶,看代码里似乎也没加? https://github.com/ant-design/ant-design-mobile/blob/master/components/tabs/index.tsx#L54

@paranoidjk paranoidjk reopened this Aug 8, 2017
@paranoidjk paranoidjk self-assigned this Aug 8, 2017
@paranoidjk paranoidjk changed the title antd-mobile组件支持Tracker里dom上的埋点属性 data-aspm/data-aspm-click等 Tabs 支持给各部分 dom 添加 data-* Aug 8, 2017
@paranoidjk
Copy link
Contributor

react-component/tabs#92

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

No branches or pull requests

3 participants