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

当时用radioGroup组件时,报"window is not defined" #1045

Closed
AnyFork opened this issue May 19, 2023 · 5 comments
Closed

当时用radioGroup组件时,报"window is not defined" #1045

AnyFork opened this issue May 19, 2023 · 5 comments

Comments

@AnyFork
Copy link

AnyFork commented May 19, 2023

Bug report 🐞

当时用radioGroup组件时,报"window is not defined",好像不支持SSR,用ClientOnly组件包装,可以正常使用。

Version & Environment

"@varlet/ui": "^2.11.0"

Expectation

500
window is not defined

at Proxy.toSizeUnit (./node_modules/@varlet/ui/es/utils/elements.mjs:235:10)
at Proxy.__render__ (./node_modules/@varlet/ui/es/icon/Icon.mjs:30:22)
at renderComponentRoot (./node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:812:16)
at renderComponentSubTree (./node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:700:28)
at renderComponentVNode (./node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:631:12)
at renderVNode (./node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:743:14)
at renderVNodeChildren (./node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:759:5)
at renderVNode (./node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:731:7)
at renderVNodeChildren (./node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:759:5)

Actual results (or Errors)

demo地址:https://stackblitz.com/edit/github-yd1x3p?file=package.json,nuxt.config.ts,app.vue

@haoziqaq
Copy link
Member

haoziqaq commented May 19, 2023 via email

@zhangkejian0
Copy link

var-swipe 组件有相同问题,不支持ssr

@haoziqaq
Copy link
Member

var-swipe 组件有相同问题,不支持ssr

尝试升级最新版本 var-swipe 在之前的版本进行过修复。

@haoziqaq
Copy link
Member

@AnyFork @varlet/[email protected] 尝试升级一下,看看问题有没有得到解决。

@AnyFork
Copy link
Author

AnyFork commented May 19, 2023

@AnyFork @varlet/[email protected] 尝试升级一下,看看问题有没有得到解决。

已解决

chouchouji pushed a commit to chouchouji/varlet that referenced this issue May 19, 2023
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