微信公开课
微信公开课小程序热门讨论关于「iphoneX适配问题」的小程序开发问题
补充:真机与编辑器不符望官方调整项目很紧年底了微信者回复开发者回复不過,你的Tabbar為何不用官方框架提供的Tabbar,而寫一個自定義Tabbar判斷方法也可以參考官方描述,使用高度判斷iPhoneXS,
展开:真机与编辑器不符望官方调整项目很紧年底了即速小程序:不過,你的Tabbar為何不用官方框架提供的Tabbar,而寫一個自定義Tabbar判斷方法也可以參考官方描述,使用高度判斷iPhoneXS,XSMax無機會測試因為基於Search搜索iPhoneX關鍵字,故之iPhoneXS也應該匹配Appjs<stylelang=lessiPhoneXisiPhoneX{paddingbottom:34px;}<style<scriptglobalData={iPhoneCompatible:notiPhoneX}onLaunch(){thischeckIsIPhoneX()}checkIsIPhoneX(){constself=thiswxgetSystemInfo({success:function(res){根据model进行判断if(resmodelsearch(iPhoneX)!==1){selfglobalDataiPhoneCompatible=isiPhoneXconsolelog(iPhoneX兼容性檢查:+selfglobalDataiPhoneCompatible)}}})}<script引用組件js<template<viewclass=bottomBar{{iPhoneCompatible}}<buttondisabled={{itemdisabled}}@tap=tapclass={{itemclass}}{{itemname}}<button<view<template<scriptimportwepyfromwepyexportdefaultclassbottomBarextendswepycomponent{data={iPhoneCompatible:wepy$instanceglobalDataiPhoneCompatible}}<script:https:developersweixinqqcomsN5jpVrms7I5d你在看看这个片段真机iphoneX跟别的手机对比一下:具体是想要反馈什么问题
更多有关「iphoneX适配问题」的讨论可以前往微信公开课小程序参与互动哦!了解更多