你好,官方
  近期有计划升级吗? 
                                        
                                    
                                    你好,官方
  近期有计划升级吗? 
                                                                                                                                                                                 
                                                                    
                                                                这个案例是怎么适配的 https://m.qinxuan.honor.cn/
 
                                                
                                             
                                                
                                             
                                                
                                             
                                                
                                             
                                                
                                             
                                                
                                             
                                                解决方案很简单,在自定义的h5 template文件head中,修改<script></script>中的代码:
<script>  
    document.addEventListener('DOMContentLoaded', function() {  
        // #ifdef H5  
        window.innerWidth = Math.min(window.innerWidth, 750)  
        document.documentElement.style.fontSize = window.innerWidth / 20 + 'px'  
        // #endif  
        // ifndef H5  
        document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'  
        // endif  
    })  
</script>具体也可以查看这篇文章:uni-app H5 平台在 PC 端实现适配
2020-05-25 14:32
 
                                                                    
                                                                如案例图
 
                                                解决方案很简单,在自定义的h5 template文件head中,修改<script></script>中的代码:
<script>  
    document.addEventListener('DOMContentLoaded', function() {  
        // #ifdef H5  
        window.innerWidth = Math.min(window.innerWidth, 750)  
        document.documentElement.style.fontSize = window.innerWidth / 20 + 'px'  
        // #endif  
        // ifndef H5  
        document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'  
        // endif  
    })  
</script>具体也可以查看这篇文章:uni-app H5 平台在 PC 端实现适配
2020-05-25 14:33
 
                                                
                                             
                                                
                                            