Open qianxuemin opened 1 year ago
服务端渲染时报错:
版本:@chatui/core@2.4.2
报错信息: ReferenceError: window is not defined
报错文件:
node_modules/@chatui/core/lib/utils/canUse.js:30:30 26 | smoothScroll: function smoothScroll() { 27 | return 'scrollBehavior' in document.documentElement.style; 28 | }, 29 | touch: function touch() { > 30 | return 'ontouchstart' in window; | ^ 31 | } 32 | }; 33 |
import dynamic from 'next/dynamic'; const Chat = dynamic(() => import('@/components/ChatUI'), {ssr: false});
服务端渲染时报错:
版本:@chatui/core@2.4.2
报错信息: ReferenceError: window is not defined
报错文件: