# Global Var
window
等全局变量在非 H5 下的 polyfill
,适用于 Vue3.x
项目。类型更加丰富。
# 使用
import { globalVarVue3 } from '@tencent/press-next/common/global-var';
globalVarVue3();
# 参数
export interface GlobalVarQuery {
// webview 页面的路径
// 默认 '/views/webview'
webviewUrl?: string;
// 是否对 webview 的 url 参数,进行 encodeURIComponent
// 默认 true
encodeURIComponentWebviewUrl?: boolean;
// 是否在将 sessionStorage 的 polyfill 设为永久存储
// 默认 false
isSessionStoragePersist?: boolean;
}