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 為圖標


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM