mirror of
https://gitee.com/dcloud/uni-preset-vue
synced 2025-05-15 07:34:04 +08:00
feat: 支持iOS安全区
This commit is contained in:
parent
4089b66c13
commit
3163e3e383
@ -4,7 +4,6 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
|
||||||
<title>
|
<title>
|
||||||
<%= htmlWebpackPlugin.options.title %>
|
<%= htmlWebpackPlugin.options.title %>
|
||||||
</title>
|
</title>
|
||||||
@ -12,6 +11,8 @@
|
|||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
|
document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
|
||||||
})
|
})
|
||||||
|
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
|
||||||
|
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
||||||
</script>
|
</script>
|
||||||
<link rel="stylesheet" href="<%= BASE_URL %>static/index.css" />
|
<link rel="stylesheet" href="<%= BASE_URL %>static/index.css" />
|
||||||
</head>
|
</head>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user