下面以一个很简单的微信小程序开发界面为例:
{
"pages": [
"pages/index/index",
"pages/logs/logs"
],
"window": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "Weixin",
"navigationBarBackgroundColor": "#ffffff"
},
"tabBar": {
"backgroundColor": "#FFFFCC",
"selectedColor": "#DB7093",
"list": [
{
"pagePath": "pages/index/index",
"selectedIconPath": "image/icon_complete-person@3x.png",
"iconPath": "image/icon_check_selected.png",
"text":"首页"
},
{
"pagePath": "pages/logs/logs",
"selectedIconPath": "image/icon_check_selected.png",
"iconPath": "image/icon_complete_green@3x.png",
"text":"首页"
}
]
},
"style": "v2",
"componentFramework": "glass-easel",
"sitemapLocation": "sitemap.json",
"lazyCodeLoading": "requiredComponents"
}
我检查好多次代码没错可为什么模拟器就是不显示界面呢?看到的界面一直都是这样的:
在代码没错的情况下经过我不断的检查发现原来是机型比例调到100%,页面太大了遮挡住了我的界面才会看不到,需要手动下拉才可以看到,如下为代码页面:
为了避免大家和范同样的错误,大家可以设置小一点的机型比例,比如85%。
一般选择机型为iphone5然后机型比例设置为85%就可以了。
文章就到这啦,不懂可以问我哦,喜欢可以点个赞和关注QAQ