/*
 * @Author: code4eat awesomedema@gmail.com
 * @Date: 2024-06-26 11:02:31
 * @LastEditors: code4eat awesomedema@gmail.com
 * @LastEditTime: 2024-08-29 17:34:36
 * @FilePath: /MediScreen/src/global.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
// script.js

function setViewportVariables() {
    const root = document.documentElement;
    root.style.setProperty('--viewport-width', `${window.innerWidth}px`);
    root.style.setProperty('--viewport-height', `${window.innerHeight}px`);
}

// 初始化设置
setViewportVariables();

// 在窗口大小变化时更新
window.addEventListener('resize', setViewportVariables);
