uniapp修改h5端標籤頁 標題和logo
標題在pages.json中 和修改app端標題一樣
修改全域性標題在navigationBarTitleText中修改
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "這個是填寫標題的地方",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8",
"navigationStyle": "custom",
}
圖示就比較麻煩了
在manifest.json--->h5配置---->index.html模板路徑-----填寫--->template.html
然後再專案根目錄下新建template.html
template.html如下:
-------------------------------------------------------------------------------------------------------------------------
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<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>
<%= htmlWebpackPlugin.options.title %>
</title>
<!-- <script>
document.addEventListener('DOMContentLoaded', function() {
document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
})
</script>-->
<link rel="stylesheet" href="<%= BASE_URL %>static/index.css" />
<link rel="icon" href="static/logo.png" />
</head>
<body>
<noscript>
<strong>Please enable JavaScript to continue.</strong>
</noscript>
<div id="app"></div>
</body>
</html>
-------------------------------------------------------------------------------------------------------------------------
static/logo.png 為圖示