当前位置: 首页 > news >正文

angularjs 网站模版军事网址大全

angularjs 网站模版,军事网址大全,外国做刹车片的企业网站,合肥建设网站制作哪个好uniapp封装虚拟列表滚动组件 这里用到一个列表#xff0c;然后数据可能有很多很多…#xff0c;一次性全部渲染到dom上会卡顿#xff0c;很废性能#xff0c;于是用了这个虚拟列表就变丝滑很多很多。 组件mosoweInventedList 代码#xff1a; !-- 虚拟滚动列表组件然后数据可能有很多很多…一次性全部渲染到dom上会卡顿很废性能于是用了这个虚拟列表就变丝滑很多很多。 组件mosoweInventedList 代码 !-- 虚拟滚动列表组件mosoweInventedList -- templateview classmosowe-invented-listscroll-view classcontainer scroll-y :style{ height: boxHeight px } scrollhandleScrolldiv classmosowe-invented-wrap :style{ height: itemHeight * list.length px }div classmosowe-invented-content :style{ transform: translateY( offsetY px) }view classmosowe-invented-item v-for(item, index) in showList :keyindexslot :itemitem/slot/view/div/div/scroll-view/view /templatescriptexport default {props: {list: {type: Array,default: () []},cacheNum: {// 前后缓存数目type: Number,default: 10}},data() {return {showList: [], // 展示的数据列表boxHeight: 0, // 组件可视区高度itemHeight: 0, // 每条数据高度计算第一条数据的高度以第一条数据高度为主offsetY: 0};},computed: {pageNum() {if (this.boxHeight this.itemHeight) {return Math.ceil(this.boxHeight / this.itemHeight) this.cacheNum;} else {return this.cacheNum;}}},watch: {pageNum() {this.setShowList(0);},list: {handler() {this.init();},deep: true,immediate: true}},mounted() {this.init();},methods: {init() {this.$nextTick(() {this.setShowList(0);let t setTimeout(() {clearTimeout(t);t null;const query uni.createSelectorQuery().in(this);query.select(.mosowe-invented-list).boundingClientRect((res) {this.boxHeight Math.floor(res?.height) || 0;}).select(.mosowe-invented-item).boundingClientRect((res) {this.itemHeight Math.floor(res?.height) || 0;}).exec();}, 100);});},handleScroll(e) {const scrollTop Math.floor(e.detail.scrollTop);this.offsetY scrollTop - (scrollTop % this.itemHeight);let startIndex Math.floor(scrollTop / this.itemHeight);if (startIndex this.cacheNum) {this.offsetY - this.cacheNum * this.itemHeight;startIndex startIndex - this.cacheNum;}this.setShowList(startIndex);this.$emit(scroll, scrollTop);},setShowList(startIndex) {this.showList this.list.slice(startIndex, startIndex this.pageNum);}}}; /scriptstyle langscss scoped.mosowe-invented-list {overflow: hidden;height: 100%;width: 100%;.container {width: 100%;height: 100%;}} /style使用 templateview classcententmosoweInventedList :listlistData :cacheNum20template #default{ item }view classitemview classlistview classcol titleimage classmark src/static/images/layout/rectangle_9.png mode/image{{ item.yhmc }}/viewview classcol areau-count-to fontSize9rpx stylecolor: #2EC38E; classunm :endValitem.mjseparator,/u-count-totext classunitk㎡/text/viewview classcol time{{ item.jmrq }}/view/viewu-divider text/u-divider/view/template/mosoweInventedList/view /template
http://www.zqtcl.cn/news/406549/

相关文章:

  • wordpress网站换字体宣传电脑的网站开发
  • 移动网站设计上机考试修改wordpress域名
  • 个体户 建设网站房子已交房 建设局网站查不到
  • 在自己的电脑建设空间网站百中搜优化软件
  • 专业房产网站建设公司wordpress导入项目
  • 网站安全建设必要性企业vi设计是什么意思
  • 建站工具有哪些社区兰州市城乡建设局网站通知公告
  • 深圳市移动端网站建设wordpress get_category_parents
  • 多用户商城(c2c)网站制作方案招聘网站如何做推广
  • 微信云网站用什么做做网站卖产品
  • 最专业的企业营销型网站建设简述无线网络优化的流程
  • 茶叶响应式网站做网站还有钱赚吗
  • 枣庄建设路小学网站资源下载wordpress
  • 青海建设厅网站首页建设一个网站论坛要多少钱
  • 网站稳定性深圳网站建设有限公司 2019
  • 西城专业网站建设公司哪家好优秀的网站建设解决方案
  • 做网站接广告手机百度引擎搜索入口
  • html5网站怎么建设后台怎么弄厦门微信网站建
  • 幻影图片一键制作网站建筑工程是干嘛的
  • 技术支持 东莞网站建设东莞天助免费网站申请域名39939cn
  • js打开网站wordpress线报主题
  • 怎么做网站首页弹幕外贸网站高端定做
  • asp.net mvc 做网站做网站原型的软件
  • wordpress网站恢复北京app建设 网站开发公司
  • 给别人做设计的网站aso优化师工作很赚钱吗
  • 网店网站建设规划方案入门编程软件
  • 网站布局企业安全文化建设导则
  • 胶东国际机场建设有限公司网站2021重大军事新闻
  • 企业网站优化的方式萍乡市建设局网站王丽
  • 做网站的收费标准社保网上服务大厅