在polyfills.ts中配置

(window as any ).global = window