标题在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 为图标

 posted on 2022-04-18 08:59  laremehpe  阅读(3845)  评论(0编辑  收藏  举报