在用Vue3+Ts开发新项目时,在ios10机器下打开是白屏
查找各种原因后,打开console,发现ios10控制台报错:ReferenceError: Can’t find variable: global
解决办法:
// index.html页面粘贴以下代码即可
<script>
! function (t) {
function e() {
var e = this || self;
e.globalThis = e, delete t.prototype._T_
}
"object" != typeof globalThis && (this ? e() : (t.defineProperty(t.prototype, "_T_", {
configurable: !0,
get: e
}), _T_))
}(Object);
</script>