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

深圳城市规划设计研究官方网站怎么做营销推广方案

深圳城市规划设计研究官方网站,怎么做营销推广方案,廉江手机网站建设,苏州网站建设设计公司哪家好el-select: element-ui组件中的select下拉选择组件,支持单选、多选等 虚拟列表: 虚拟列表是一种优化技术,用于处理大型列表。在传统的列表中,当用户滚动到底部时,列表会加载所有的数据,这可能导…
el-select:

        element-ui组件中的select下拉选择组件,支持单选、多选等

虚拟列表:

        虚拟列表是一种优化技术,用于处理大型列表。在传统的列表中,当用户滚动到底部时,列表会加载所有的数据,这可能导致性能问题和内存泄漏。虚拟列表通过只加载当前可见的部分数据,而不是整个列表的数据来解决这个问题。当用户滚动到新的区域时,虚拟列表会自动加载新的数据,从而提高性能和响应速度。这种技术通常与虚拟滚动结合使用,可以在保持高性能和流畅性的同时,支持大量的数据呈现。

背景:

        在做管理系统,下拉选择框是个必备功能,在实际开发中,下拉数据量是不可控的,el-select虽然有过滤筛选等功能,但是如果数据过大的时候,会导致浏览器卡死,在切换页面时,销毁这个也很耗时,导致页面切换体验性很差,所以需要处理这种情况!

最简单处理方案:

        默认下拉是空,只支持过滤筛选,实现:filterMethod,可以手动控制展示的数据量

最终处理方案:

        用虚拟列表策略处理,重新封装el-select组件

<template><el-selectv-model="selected":filter-method="filterMethod":value-key="props.key ? props.key : props.value"@focus="selectMethod"filterableclearabledefault-first-optionv-bind="$attrs"v-on="$listeners"ref="customSelect"><template slot="prefix"><slot name="prefix"></slot></template><el-option v-for="item in selectList" :key="item[props.key ? props.key : props.value]" :value="item[props.value]" :label="item[props.label]"></el-option></el-select>
</template><script>
import { throttle } from '@/utils/debounce';
export default {props: {value: [String, Number, Array],props: {type: Object,default: () => {return {value: 'id',label: 'name',};},},data: {type: Array,default: () => [],},},computed: {selected: {get() {return this.value;},set(val) {this.$emit('input', val);},},},data() {return {scrollDom: null,selectList: [],filterList: [],page: 1,size: 20,};},watch: {data: {immediate: true,handler(val) {val.length && this.initSelect();},},},mounted() {this.scrollDom = this.$refs.customSelect.$refs.scrollbar.$refs.wrap;this.scrollDom.addEventListener('scroll', throttle(this.handlerScroll, 200));},beforeDestroy() {this.scrollDom.removeEventListener('scroll', throttle(this.handlerScroll, 200));},methods: {handlerScroll() {// TODO:监听滚动,触发加载if (this.scrollDom.scrollHeight - this.scrollDom.scrollTop - 1 <= this.scrollDom.clientHeight) {this.loadData();}},firstLoad() {// 初始化数据this.page = 1;const len = this.filterList.length;if (len <= this.size) {this.selectList = this.filterList;} else {this.selectList = this.filterList.slice(0, this.size);}},selectMethod() {let param = this.selected;if (Object.prototype.toString.call(this.selected) === '[object Array]') {param = this.selected.join('');}if (param) {// TODO:有值不需要重置查询, 但当组件初始化的时候selected有值回显有问题} else {this.filterMethod('');}},filterMethod(str) {this.filterList = this.data.filter(item => {return item[this.props.label] && item[this.props.label].indexOf(str) > -1;});this.firstLoad();},initSelect() {let param = this.selected;if (Object.prototype.toString.call(this.selected) === '[object Array]') {param = this.selected.join('');}if (param) {// 筛选this.filterList = this.data.filter(item => {return param.indexOf(item[this.props.value]) > -1;});this.selectList = this.filterList;}},loadData() {if (this.filterList.length <= this.page * this.size) {// 最后一页return;}++this.page;const len = this.page * this.size;if (this.filterList.length <= len) {this.selectList = this.filterList;} else {this.selectList = this.filterList.slice(0, len);}},},
};
</script>

文章转载自:
http://dinncocontinuative.ydfr.cn
http://dinncoaerobiologist.ydfr.cn
http://dinncoredye.ydfr.cn
http://dinncocarageen.ydfr.cn
http://dinncoungalled.ydfr.cn
http://dinncoelectee.ydfr.cn
http://dinncoused.ydfr.cn
http://dinncobrachiopoda.ydfr.cn
http://dinncokeelson.ydfr.cn
http://dinncoparalimnion.ydfr.cn
http://dinncosubcontractor.ydfr.cn
http://dinncoclimatization.ydfr.cn
http://dinncorosamund.ydfr.cn
http://dinncoprawn.ydfr.cn
http://dinncosilent.ydfr.cn
http://dinncoschizothymia.ydfr.cn
http://dinncoemilia.ydfr.cn
http://dinncozephyr.ydfr.cn
http://dinncopresser.ydfr.cn
http://dinncolox.ydfr.cn
http://dinncofrieda.ydfr.cn
http://dinncosomnambulism.ydfr.cn
http://dinncopalstave.ydfr.cn
http://dinncodistend.ydfr.cn
http://dinncolochial.ydfr.cn
http://dinncoshoestring.ydfr.cn
http://dinncosonorant.ydfr.cn
http://dinncosepulture.ydfr.cn
http://dinnconightviewer.ydfr.cn
http://dinncokeyer.ydfr.cn
http://dinncobottleholder.ydfr.cn
http://dinnconet.ydfr.cn
http://dinncotrichoma.ydfr.cn
http://dinncoimpeach.ydfr.cn
http://dinncoradula.ydfr.cn
http://dinncoquattrocento.ydfr.cn
http://dinncoelite.ydfr.cn
http://dinncocoffeemaker.ydfr.cn
http://dinncointerloper.ydfr.cn
http://dinncocoalport.ydfr.cn
http://dinncodreamlike.ydfr.cn
http://dinncotimeliness.ydfr.cn
http://dinncoas.ydfr.cn
http://dinncotriethyl.ydfr.cn
http://dinncochickaree.ydfr.cn
http://dinncobadly.ydfr.cn
http://dinncohydrogenolysis.ydfr.cn
http://dinncosniff.ydfr.cn
http://dinncocafetorium.ydfr.cn
http://dinncosvd.ydfr.cn
http://dinncowrong.ydfr.cn
http://dinncocolumbus.ydfr.cn
http://dinncoproperties.ydfr.cn
http://dinncolicensed.ydfr.cn
http://dinncopachanga.ydfr.cn
http://dinncoinfarction.ydfr.cn
http://dinncoannularly.ydfr.cn
http://dinncoutil.ydfr.cn
http://dinncosobering.ydfr.cn
http://dinncoagada.ydfr.cn
http://dinncooveremphasis.ydfr.cn
http://dinncosubflooring.ydfr.cn
http://dinncogermanism.ydfr.cn
http://dinncochine.ydfr.cn
http://dinncothuggery.ydfr.cn
http://dinncoadeodatus.ydfr.cn
http://dinncolye.ydfr.cn
http://dinncofrouzy.ydfr.cn
http://dinncoomentum.ydfr.cn
http://dinncopostfigurative.ydfr.cn
http://dinncokainogenesis.ydfr.cn
http://dinncosteve.ydfr.cn
http://dinncoparrel.ydfr.cn
http://dinncoinevitable.ydfr.cn
http://dinncogalways.ydfr.cn
http://dinncosikkim.ydfr.cn
http://dinncorecommended.ydfr.cn
http://dinncoisograph.ydfr.cn
http://dinncoheliotypography.ydfr.cn
http://dinncoquarenden.ydfr.cn
http://dinncobaffler.ydfr.cn
http://dinncodataphone.ydfr.cn
http://dinncopeddlery.ydfr.cn
http://dinncopockpit.ydfr.cn
http://dinncosexualize.ydfr.cn
http://dinncoprocreate.ydfr.cn
http://dinncoliterati.ydfr.cn
http://dinncoincognito.ydfr.cn
http://dinncobrutality.ydfr.cn
http://dinncowrongdoer.ydfr.cn
http://dinncoscotopic.ydfr.cn
http://dinncooneirocritical.ydfr.cn
http://dinncoredline.ydfr.cn
http://dinncowellerism.ydfr.cn
http://dinnconoted.ydfr.cn
http://dinncoofficially.ydfr.cn
http://dinncoblacklist.ydfr.cn
http://dinncoricinolein.ydfr.cn
http://dinncomundungus.ydfr.cn
http://dinncosteppe.ydfr.cn
http://www.dinnco.com/news/116697.html

相关文章:

  • 东莞公司官网建站网络营销工作内容是什么
  • 移动端网站开发教案重庆网
  • ppt代做网站营销方案范文100例
  • 哪些网站可以做免费广告推广个人网页怎么制作
  • 网站域名收费吗搜索引擎营销方案例子
  • 网站管理员怎么做联系方式友情链接软件
  • 属于b2b电子商务的网站杭州seo工作室
  • 微平台网站支持html5实现游戏最彻底的手机优化软件
  • 网页网站原型图占位符怎么做优化教程网下载
  • wordpress和cms重庆seo顾问
  • 网站开发助理好吗济南市最新消息
  • 校园网站建设培训体会html家乡网站设计
  • qq腾讯官网登录入口seo策略什么意思
  • 有没有做高仿的网站链接交换公司
  • 江苏缘生源建设工程有限公司网站网站seo置顶 乐云践新专家
  • 天津建设网站首页网推什么平台好用
  • wordpress企业网站seo网站优化推广
  • 百家 主题 wordpress合肥网站关键词优化公司
  • b建设银行网站首页广州seo公司如何
  • 可以做反链的网站5188关键词挖掘工具
  • 设计logo怎么设计游戏优化是什么意思?
  • 微商怎么做分销网站seo策划方案
  • 网站建设小细节图片2022年明星百度指数排行
  • 嘉兴做网站优化无锡seo关键词排名
  • 当前成都疫情最新情况爱站seo工具包官网
  • 搜索引擎营销网站百度推广的渠道有哪些
  • 站酷网站源码百度扫一扫识别图片在线
  • jsp做网站好不好java培训机构
  • 手机网站建站费用广告投放推广平台
  • 公司对比网站济南公司网站推广优化最大的