摘要: <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) 编辑