上一页 1 ··· 3 4 5 6 7 8 9 下一页
摘要: function query(key,list){ // 我这里直接return(也可赋给变量return变量出去) return list.filter(item => { // 如果list(name)包含key(输入框) => true if(item.includes(key)){ // 返 阅读全文
posted @ 2020-03-19 10:10 自律·给我自由 阅读(1176) 评论(0) 推荐(0) 编辑
摘要: <template> <view class="page-box"> <uniStatusBar class="status"></uniStatusBar> <uniStatusBar></uniStatusBar> <view style="height:200px">滚动试试</view> < 阅读全文
posted @ 2020-03-18 11:14 自律·给我自由 阅读(2332) 评论(0) 推荐(0) 编辑
摘要: 实现:锚点滚动到指定位置uni.createSelectorQuery().in(this).select("#one").boundingClientRect(data => { uni.pageScrollTo({ duration:200, scrollTop: that.scrollTop 阅读全文
posted @ 2020-03-18 11:12 自律·给我自由 阅读(1260) 评论(0) 推荐(0) 编辑
摘要: uni.createSelectorQuery().select(".app").boundingClientRect(data=>{//目标节点 uni.createSelectorQuery().select(".al").boundingClientRect((res)=>{//最外层盒子节点 阅读全文
posted @ 2020-03-18 11:08 自律·给我自由 阅读(20458) 评论(0) 推荐(0) 编辑
摘要: let escape2Html=(str)=>{ var arrEntities = { 'lt': '<', 'gt': '>', 'nbsp': ' ', 'amp': '&', 'quot': '"' }; return str.replace(/&(lt|gt|nbsp|amp|quot); 阅读全文
posted @ 2020-03-18 11:06 自律·给我自由 阅读(635) 评论(0) 推荐(0) 编辑
摘要: /* //nav切换 需要初始化数据 this.taskList = []; this.totlePage=''; this.params.page =1; this.count=''; this.showTxt=''; */ data() { return { taskList: [], totl 阅读全文
posted @ 2020-03-13 11:23 自律·给我自由 阅读(10338) 评论(0) 推荐(1) 编辑
摘要: function price(a){ var num = Number(a); if(!num){//等于0 return num+'.00'; }else{//不等于0 num = Math.round((num)*100)/10000; num = num.toFixed(2); num+='' 阅读全文
posted @ 2020-03-04 18:10 自律·给我自由 阅读(2158) 评论(0) 推荐(0) 编辑
摘要: 1.使用数组方法splice this.arr = [{item1},{item2},{item3},{item4}] item1.a= 0 this.arr.splice(0, 1, item1) 注意: 由于 JavaScript 的限制,Vue 不能检测以下变动的数组: 1.当你利用索引直接设 阅读全文
posted @ 2020-03-04 11:50 自律·给我自由 阅读(6256) 评论(0) 推荐(0) 编辑
摘要: /* 自 HBuilderX v1.1.0 起,uni-app 的页面新增 onBackPress(event) 生命周期函数。 onBackPress(event) 返回 event ={from: backbutton | navigateBack} 说明 当用户进行以下操作时,会触发该函数: 阅读全文
posted @ 2020-03-03 10:32 自律·给我自由 阅读(9401) 评论(0) 推荐(0) 编辑
摘要: <div class="upload-img"> <div class="img-box" v-for="(item,index) in uploadImages" :key="index"> <img class="image" :src="item"> </div> <!-- vant的uplo 阅读全文
posted @ 2020-02-14 18:04 自律·给我自由 阅读(34119) 评论(2) 推荐(1) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 下一页