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

在 nuxt 中几乎所有组件都会爆 window is not defined 错误 #1115

Closed
PDieE opened this issue Oct 5, 2023 · 6 comments
Closed

在 nuxt 中几乎所有组件都会爆 window is not defined 错误 #1115

PDieE opened this issue Oct 5, 2023 · 6 comments
Labels
bug Something isn't working hard 困难问题 issueshoot 代码共建平台

Comments

@PDieE
Copy link

PDieE commented Oct 5, 2023

tdesign-mobile-vue 版本

1.0.5

重现链接

No response

重现步骤

在 nuxt 中使用按需引入的方式进行使用后在服务端渲染时会爆 window is not defined 错误,如果使用 ClientOnly 标签包裹则不会

期望结果

希望能更好的兼容 nuxt

实际结果

No response

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

IssueShoot

  • 预估时长: 5
  • 期望完成时间: 2023-10-20 00:00:00 +0000 UTC
  • 开发难度: 高
  • 参与人数: 1
  • 需求对接人: anlyyao
  • 验收标准: 实现期望改造效果,提 PR 并通过验收无误
  • 备注: 最终激励以实际提交 pull request 并合并为准
@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2023

👋 @PDieE,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@PParanoid PParanoid added the bug Something isn't working label Oct 7, 2023
@PParanoid
Copy link
Collaborator

@PDieE 收到反馈,确实有这个问题,需要集中处理一下,window在 ssr 时是不存在的。但应该不是所有组件都涉及,你这次具体用到了哪些组件呢?

@PDieE
Copy link
Author

PDieE commented Oct 7, 2023

@PParanoid 目前我只尝试了 swiper image button

@anlyyao anlyyao added issueshoot 代码共建平台 hard 困难问题 labels Oct 10, 2023
@zyhnbyyds
Copy link

什么时候能支持ssr呢🤓

@anlyyao
Copy link
Collaborator

anlyyao commented Mar 28, 2024

什么时候能支持ssr呢🤓

下周发版支持~

@anlyyao
Copy link
Collaborator

anlyyao commented Apr 19, 2024

已修复于 1.2.0 版本

@anlyyao anlyyao closed this as completed Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hard 困难问题 issueshoot 代码共建平台
Projects
None yet
Development

No branches or pull requests

4 participants