微信小程序--屏幕方向
微信小程序中有些地方的修改,既可以通过调用 wx 接口,也可以通过 .json 文件的设置。
比如:导航栏标题文字内容。
// page.json
{
"usingComponents": {},
"navigationBarTitleText": "这里是标题"
}// 调用接口
onLoad() {
wx.setNavigationBarTitle({
title: "新饼图"
})
},而有些则只能在配置项中设置。如:屏幕旋转设置
{
"usingComponents": {
"ec-canvas": "../../../ec-canvas/ec-canvas"
},
"pageOrientation": "landscape", // 支持 auto / portrait(竖屏) / landscape(横屏)
"navigationBarTitleText": "折线"
} 相关推荐
大地飞鸿 2020-11-12
星星有所不知 2020-10-12
jinxiutong 2020-07-26
MIKUScallion 2020-07-05
songfens 2020-07-05
songfens 2020-06-11
songfens 2020-06-08
northwindx 2020-05-31
northwindx 2020-05-31
northwindx 2020-05-27
northwindx 2020-05-25
MIKUScallion 2020-05-25
jinxiutong 2020-05-10
xdyangxiaoromg 2020-05-10
大地飞鸿 2020-05-06
northwindx 2020-04-25