Hbuilder问题记录

 

一、若是夜神模拟器显示下面错误html

mkdir failed for /storage/emulated/legacy/Android/data/io.dcloud.HBuilder/apps/HBuilder/www/, Device or resource busy
解决方法:把后台运行杀掉或者点击终止而后再从新运行vue

 二、vue.min.js 2.3的压缩版本能够把函数放到vue的外面,未压缩的版本就报错web

三、打开360手机助手会影响夜神模拟器链接 服务器

四、mui遮罩层的使用
假如从列表到detail页面,detail页面须要从服务器请求数据,页面显示为不断增长内容,体验很是很差,咱们每每须要在加载页面的时候采用等待框与遮罩层,等数据所有返回后,
关闭等待框与遮罩层,遮罩层的样式是.mui-backdrop {
                position: fixed;
                top: 0;
                right: 0;
                bottom: 0;
                left: 0;
                z-index: 998;
                background-color:rgba(0,0,0,.3)
                //background-color: #f5f5f5;
            }网络

定义的,若改变遮罩层的样式只须要把.mui-backdrop的样式覆盖,如背景颜色改为浅灰色background-color: #f5f5f5; app

五、头部header不能有空格,不然报错,正确以下:
<!doctype html>
<html>
    <head> ide

    <head>  函数

六、ui

wap2app wap站首页地址 IP地址如:http://192.168.1.199/index.html 不能写http://127.0.0.1/index.html htm

七、

打包时若是显示:app打包须要将资源提交到云端服务器,链接云端服务器失败,请检查网络,若是网络没问题,先把Hbuilder关闭再重启

八、

当下拉刷新与上拉加载与区域滚动mui-scroll-wrapper一块儿使用时,mui-scroll-wrapper设置的style 样式如高度height无效
<div id="refreshContainer" class="mui-scroll-wrapper" style="top:0;padding-bottom:50px;">
上拉加载若是被tab遮住,须要定义滚动div的padding-bottom

九、

点击下面原生tab切换tab时若是须要滚到到顶部,在每一个tab所在的webview 设置下面js代码

mui.plusReady(function(){                 var self=plus.webview.currentWebview();                 //添加hide事件,滚到最顶部                 self.addEventListener("hide",function(e){                     window.scrollTo(0,0);                     console.log("yin cang")                 },false)             })