mirror of
https://github.com/langgenius/dify.git
synced 2026-11-13 14:51:39 +08:00
8 lines
225 B
TypeScript
8 lines
225 B
TypeScript
import type { Window } from 'happy-dom'
|
|
|
|
export const setViewportWidth = (width: number) => {
|
|
;(window as unknown as Window).happyDOM.setViewport({ width })
|
|
}
|
|
|
|
export const resetViewportWidth = () => setViewportWidth(1024)
|