上一页 1 ··· 8 9 10 11 12 13 下一页
摘要: //ES5合并数组 var arr = [12,true,5]; var arrCont = [1,6,66].concat(arr); console.log(arrCont);//[1, 6, 66, 12, true, 5] //ES6 var arr = [12,true,5]; var a 阅读全文
posted @ 2019-01-31 10:42 Webwhl 阅读(754) 评论(0) 推荐(0) 编辑
摘要: function f(){ var a = Array.prototype.slice.call(arguments);//传的参数转为数组 var sum= 0; a.forEach(function(item){ sum+=item*1; }) return sum } console.log( 阅读全文
posted @ 2019-01-31 10:35 Webwhl 阅读(1969) 评论(0) 推荐(0) 编辑
摘要: 每个页面都要在app.json中配置 "pages": [ "pages/index/index", "pages/list/list", "pages/RealTimeData/RealTimeData", "pages/buildInfo/buildInfo", "pages/search/se 阅读全文
posted @ 2019-01-22 15:07 Webwhl 阅读(161) 评论(0) 推荐(0) 编辑
摘要: <component v-if="hackReset"></component> 2 3 4 this.hackReset = false this.$nextTick(() => { this.hackReset = true }) hackReset写在父data中开始hackReset=tru 阅读全文
posted @ 2019-01-03 09:50 Webwhl 阅读(646) 评论(0) 推荐(0) 编辑
摘要: 1、首先,底部的高不能写死。 2、 var footer = $api.byId('footer'); $api.fixTabBar(footer);这句应该写在 footerHeight = $api.offset(footer).h;前面 阅读全文
posted @ 2018-12-17 17:27 Webwhl 阅读(712) 评论(0) 推荐(0) 编辑
摘要: //slots:[{values: ['年假', '事假', '病假', '婚假', '其他']}], slots:[{values: []}], onValuesChange(picker,values) {// console.log(picker)// console.log(values) 阅读全文
posted @ 2018-12-17 11:18 Webwhl 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 页面布局时头部和内容一定要分开,状态栏寖入式要用。可以用api.sendEvent广播出去,api.addlisterten监听. api.openWin打开页面会有黑色闪屏,加bgColor:'#fff', ios有页面滑动加 slidBackEnabled: false去掉. 启动页 打开到登录 阅读全文
posted @ 2018-12-13 17:21 Webwhl 阅读(966) 评论(0) 推荐(0) 编辑
摘要: <p id="timeTxt"></p> <script type="text/javascript"> function add(m){ return m<10 ? "0"+m : m; } var time2 = new Date().getTime(); function getTime(ti 阅读全文
posted @ 2018-12-13 11:29 Webwhl 阅读(153) 评论(0) 推荐(0) 编辑
摘要: function datezh(s){ return s = s>9 ? s:"0"+s } function dateTime(t){ var getNowTime = vm.getServerTime.replace(/-/g,"/");//vue vm.getServerTime获取到的服务器 阅读全文
posted @ 2018-12-12 14:31 Webwhl 阅读(167) 评论(0) 推荐(0) 编辑
摘要: var getSocketUrl = localStorage.getItem("socketUrl"); getSocketUrl = getSocketUrl && getSocketUrl.split("//")[1]; 阅读全文
posted @ 2018-12-12 14:20 Webwhl 阅读(334) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 下一页