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

SubMenu使得服务端和客户端render的html不一致 #55

Closed
xpcode opened this issue Oct 14, 2016 · 12 comments
Closed

SubMenu使得服务端和客户端render的html不一致 #55

xpcode opened this issue Oct 14, 2016 · 12 comments
Assignees

Comments

@xpcode
Copy link

xpcode commented Oct 14, 2016

https://github.com/react-component/menu/blob/master/src/SubMenu.jsx

render函数里的
this._menuId = this._menuId || guid();
在服务端渲染和客户端渲染会生成不同的html,使得做同构应用时客户端需要重复渲染,希望能把guid()换成一个客户端和服务端保持一直的字符串

@afc163
Copy link
Member

afc163 commented Oct 14, 2016

ant-design/ant-design#2061
ant-design/ant-design#2406
ant-design/ant-design#3293

感谢反馈,终于找到上面这些问题的原因了~

@xpcode
Copy link
Author

xpcode commented Oct 14, 2016

那你不来实际点的感谢 @afc163 哈哈

@afc163
Copy link
Member

afc163 commented Oct 14, 2016

来个 PR 修复此问题,我给你寄个部门内用的纪念杯子~ 👊🏻

@xpcode
Copy link
Author

xpcode commented Oct 14, 2016

就这么定了

@xpcode
Copy link
Author

xpcode commented Oct 14, 2016

就这么定了,没有环境,未跑测试啊

#56

@afc163
Copy link
Member

afc163 commented Oct 17, 2016

closed in #56

@xpcode 虽然没有合并你的代码,但是杯子还是会寄给你的,把地址和电话邮件给我吧~

@yiminghe
Copy link
Member

eventKey 不需要

@afc163
Copy link
Member

afc163 commented Oct 17, 2016

@xpcode 单独邮件给我,你这么发信息都泄漏了呀,我给你删掉了。

@afc163
Copy link
Member

afc163 commented Oct 17, 2016

你又发出来了。。。。

@xpcode
Copy link
Author

xpcode commented Oct 17, 2016

现在需要在前后端指定 eventKeyMenu.Item key={1} eventKey={1} /

这样不能解决问题,需求是:

同一个页面使用多个SubMenu时,每个实例的_menuId不同;但同一个SubMenu在每次render时_menuId却相同。

原始邮件
发件人:偏右[email protected]
收件人:react-component/[email protected]
抄送:[email protected]; [email protected]
发送时间:2016年10月17日(周一) 11:51
主题:Re: [react-component/menu] SubMenu使得服务端和客户端render的html不一致 (#55)

closed in #56
现在需要在前后端指定 eventKey Menu.Item key={1} eventKey={1} /。
@xpcode 虽然没有合并你的代码,但是杯子还是会寄给你的,把地址和电话邮件给我吧~

You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@afc163
Copy link
Member

afc163 commented Oct 17, 2016

不需要指定 eventKey 了,直接用的 key 。

@xpcode
Copy link
Author

xpcode commented Oct 17, 2016

sorry,我错了,原来eventKey就是key,换成这样写就没问题了SubMenu key=“submenu” … /

原始邮件
发件人:[email protected]
收件人:react-component/[email protected]; react-component/[email protected]
抄送:[email protected]
发送时间:2016年10月17日(周一) 14:50
主题:Re: [react-component/menu] SubMenu使得服务端和客户端render的html不一致 (#55)

现在需要在前后端指定 eventKeyMenu.Item key={1} eventKey={1} /

这样不能解决问题,需求是:

同一个页面使用多个SubMenu时,每个实例的_menuId不同;但同一个SubMenu在每次render时_menuId却相同。

原始邮件
发件人:偏右[email protected]
收件人:react-component/[email protected]
抄送:[email protected]; [email protected]
发送时间:2016年10月17日(周一) 11:51
主题:Re: [react-component/menu] SubMenu使得服务端和客户端render的html不一致 (#55)

closed in #56
现在需要在前后端指定 eventKey Menu.Item key={1} eventKey={1} /。
@xpcode 虽然没有合并你的代码,但是杯子还是会寄给你的,把地址和电话邮件给我吧~

You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

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 a pull request may close this issue.

3 participants