1、避免深分页操作 es是一个搜索引擎,所以如果用这个搜索引擎对大量的数据进行搜索,并且返回搜索结果中排在最前面的少数结果,是非常合适的。 类似于后台下载功能,如果要做成类似数据库的东西,每次都进行大批量的查询,是很不合适的。如果真的要做大批量结果的查询,记得考虑用scroll api。 2、避免业 ...
分类:
其他好文 时间:
2020-06-26 20:34:36
阅读次数:
64
安装 npm install better-scroll --save 调用: //重要是这两个标红的class类名 <div class="wrapper recommend" ref="wrapper"> <div class="content recommendHeight"> <h2 cla ...
分类:
其他好文 时间:
2020-06-26 20:15:37
阅读次数:
64
1、SEE:https://elasticsearch.cn/article/32 2、倒排词典的索引需要常驻内存,无法 GC,需要监控 data node 上 segment memory 增长趋势。 3、各类缓存,field cache, filter cache, indexing cache ...
分类:
其他好文 时间:
2020-06-26 10:56:28
阅读次数:
70
文本超出隐藏显示省略号 1、单行文本的溢出显示省略号 overflow: hidden; text-overflow:ellipsis; white-space: nowrap; // overflow 属性规定当内容溢出元素框时发生的事情,可能值为visible(默认)、hidden、scroll ...
分类:
Web程序 时间:
2020-06-26 01:25:18
阅读次数:
107
技术概述 虚拟列表(VirtualList)是一种在展示大量数据(长列表)时使用的插件,通过只显示必要的DOM和无限滚动,提升页面的性能。在web环境中,我们可以使用vue-virtual-scroll-list之类的npm包。最近热门的小程序框架Taro3也提供了这个能力。从文档说明上看,其功能算 ...
分类:
其他好文 时间:
2020-06-25 23:12:02
阅读次数:
378
页面定制 CSS 代码 html{overflow: overlay;scroll-behavior: smooth;}body{background:#fff;min-height:100%;height:100%;color:#314659!important;font-family:Lato, ...
分类:
其他好文 时间:
2020-06-25 18:01:05
阅读次数:
60
问题:如何加滚动条? 给div 设置css 样式overflow:scroll div { width:150px; height:150px; overflow:scroll; } .ledt-size{ height:93vh; width:230px; overflow:scroll; bac ...
分类:
Web程序 时间:
2020-06-25 15:32:04
阅读次数:
81
window.addEventListener('scroll', function () { var top = $(window).scrollTop(); this.btnShow = top < 2500 console.log(this.btnShow) }); function中的内容, ...
分类:
其他好文 时间:
2020-06-24 20:06:43
阅读次数:
61
一、scroll 相关属性 1、window.onscroll() 方法 当我们用鼠标滚轮,滚动网页的时候,会触发 window.onscroll() 方法。 如果你需要做滚动监听,可以使用这个方法。 2、ScrollWidth 和 scrollHeight `ScrollWidth` 和 `scr ...
分类:
Web程序 时间:
2020-06-24 12:23:39
阅读次数:
96
页面滚动时,添加平滑特效 1.在页面入口处,添加css 1 html { 2 scroll-behavior: smooth; 3 } 添加全局css之后,直接使用window.scroll(0,0)就可以平滑滚动到顶部了。 注:兼容性很差,仅支持火狐、chrome高级版本 2.指定滚动操作,使用平 ...
分类:
其他好文 时间:
2020-06-23 01:23:04
阅读次数:
130