- ElementUI 动态表格高度,使页面一屏显示
我的心巴
elementui前端javascript
一、效果二、代码exportdefault{data(){return{maxHeight:500}},methods:{handlePageReSize(){letcard=document.querySelector('.el-card');this.maxHeight=card.clientHeight-108;}},mounted(){let_this=this;window.onresi
- vue.js 获取当前屏幕的宽度_js获取浏览器和屏幕的各种宽度高度
梦终会碎
vue.js获取当前屏幕的宽度
一:网页可见区域宽高,不包括工具栏和滚动条(浏览器窗口可视区域大小)1.对于IE9+、chrome、firefox、Opera、Safari:window.innerHeight浏览器窗口的内部高度;window.innerWidth浏览器窗口的内部宽度;2.对于IE8.7.6.5:document.documentElement.clientHeight:表示HTML文档所在窗口的当前高度;do
- 31. 高度过渡 & 带粘性分区标题的列表
@大迁世界
CSS技巧与案例详解javascript前端
高度过渡当元素的高度未知时,将元素的高度从0过渡到auto。使用transition指定max-height的变化应该被过渡。使用overflow:hidden防止隐藏元素的内容溢出其容器。使用max-height指定0的初始高度。使用:hover伪类将max-height更改为由JavaScript设置的--max-height变量的值。使用Element.scrollHeight和CSSSty
- 获取各种高度 等H5页面笔记
年轻人多学点
网页可见区域宽:document.body.clientWidth网页可见区域高:document.body.clientHeight网页可见区域宽:document.body.offsetWidth(包括边线的宽)网页可见区域高:document.body.offsetHeight(包括边线的高)网页正文全文宽:document.body.scrollWidth网页正文全文高:document.
- 【elementUi-table表格】 滚动条 新增监听事件; 滚动条滑动到指定位置;
今天搬砖了么
前端elementui前端javascriptvuehtml
1、给滚动条增加监听this.dom=this.$refs.tableRef.bodyWrapperthis.dom.scrollTop=0let_that=thisthis.dom.addEventListener('scroll',()=>{//获取元素的滚动距离letscrollTop=_that.dom.scrollTop//获取元素可视区域的高度letclientHeight=this.
- js使用touchstart touchmove touchend函数实现h5移动端上下滑动翻页
是草莓味的啊
javascript前端
~没有更多了~~暂无数据~//虚拟滚动,解决数组大量卡顿问题importVirtualListfrom'vue-virtual-scroll-list'importListItemfrom'./ListItem.vue'import{onCall,onMap}from'@/utils/index'constclientHeight=document.documentElement.clientHe
- day29 js基础5
跟我念一遍
//获取可视区的宽度和高度//获取宽高的时候,要看有没有DTD的说明,如果有,使用documentElement,如果没有,使用bodyvarclientWidth=document.documentElement.clientWidthvarclientHeight=document.documentElement.clientHeight1、吸顶条//可以直接获取到div的宽度和高度,而且是不
- oracle查询中间条记录,oracle SQL查询中间若干条记录
y921112y921112
oracle查询中间条记录
方法一:利用rownum和差集函数minusselect*from(select*fromemporderbysal)whererownumfirst();Eloquent内部使用的是PDO参数绑定,所以你的请求是安...vue实现pc端无限加载功能主要思路通过自定义指令,在视图初始化完成后,绑定scroll事件.当scrollTop+clientHeight>=scrollHeight时(此时滚
- typescritp 动态获取div的真实高度
马小帅mm
因为typescript的类型检查一直提示没有offsetHeight属性,所以用as类型断言成HTMLDivElement类,就不会报错constel=document.querySelector('.edit-div')constelHeight:number=(elasHTMLDivElement).offsetHeight
- day24 其他事件(页面尺寸事件)
亦昭昭
记录前端学习javascript前端
目录页面尺寸事件元素尺寸于位置尺寸页面尺寸事件会在窗口尺寸改变的时候触发事件resize检测屏幕宽度获取宽高获取元素的可见部分宽高(不包含边框、margin、滚动条等),即:内容+padding+borderclientWidth和clientHeightDocumentdiv{width:200px;height:200px;background-color:gold;padding:10px;
- el-table滚动加载数据
宏_4491
为el-table全局注册自定义指令,用来监听el-table滚动到底部时的事件,在main.js中注册bind(el,binding){constselectWrap=el.querySelector('.el-table__body-wrapper');selectWrap.addEventListener('scroll',function(){if(this.scrollHeight-th
- 34.性能优化问题,老司机如何解决(下)
ikonan
上一节课,我们从宏观上讲述了性能优化的概念。这一节,我们直接来「手写代码」。在此之前,我们先回顾一下「性能优化」主题的知识点:代码例题实战「白板写代码」是考察候选人基础能力、思维能力的有效手段。这一部分,我们列举几个性能相关的代码片段,供读者体会。实战1:初步解决布局抖动问题请候选人对以下代码进行优化:varh1=element1.clientHeightelement1.style.height
- 滑动一整屏
初晨未凉
前端javascript
需求:用户通过鼠标滚轮滑动的时候一整屏进行翻页。参考网站效果微派网络实现思路:1.首先我们需获取可视区域的高度document.documentElement.clientHeight;2.根据动态设置top属性即可进行翻页。3.需判断上滑还是下滑根据onmousewheel滚轮事件即可判断,开始时间为当前时间,结束时间为事件结束以后当时间,若是差值为负数到一定区间,即可判断为向上滑动,否则为向下
- 随笔50-原生写某块区域下拉触底事件
是青水啊
因为上面不是随笔47写了element的下拉框触底事件,但是现在做了一个东西没有使用框架,没办法,就手动需要写一个下拉触底事件代码如下@scroll是下拉事件在onReachBottom方法里判断内容的高度减去滚动条距离顶部的距离是否小于或者等于该容器的固定高度如果是就代表触底了letclientHeight=this.$refs.activity_scroll.clientHeight;//该容
- offsetWidth、offsetHeight、clientWidth、clientHeight 介绍
小贤笔记
offsetWidth//返回元素的宽度(包括元素宽度、内边距和边框,不包括外边距)offsetHeight//返回元素的高度(包括元素高度、内边距和边框,不包括外边距)clientWidth//返回元素的宽度(包括元素宽度、内边距,不包括边框和外边距)clientHeight//返回元素的高度(包括元素高度、内边距,不包括边框和外边距)style.width//返回元素的宽度(包括元素宽度,不包
- JS基础学习:Scroll系列/元素计算后的样式属性值
Merbng
scrollWidth元素中内容的实际的宽(没有边框),如果没有内容就是元素的宽scrollHeight元素中内容的实际的高(没有边框),如果没有内容就是元素的高*{padding:0;margin:0;}div{width:300px;height:200px;border:1pxsolidred;overflow:auto;}input{top:120px;left:330px;positio
- [element-ui] el-table 行内新增,滚动条自动滚到最顶部,或者最底部
533_
element-uivue.js前端elementui
letitem={name:'111',age:22,}this.dataList.push(item)//跳到底部操作this.$nextTick(()=>{this.$refs.containerTable.bodyWrapper.scrollTop=this.$refs.containerTable.bodyWrapper.scrollHeight});//跳到顶部操作this.$refs.
- el-table滚动加载下一页
珊珊美眉
javascriptvue.js前端
//获取表格对象letdom=document.querySelector(".el-table__body-wrapper");letthat=this;dom.addEventListener("scroll",()=>{if(!that.addLoading){constscrollDistance=dom.scrollHeight-dom.scrollTop-dom.clientHeigh
- js实现自动滚动
学敲代码的Stars
javascript前端开发语言
js实现自动滚动,再也不用求swiper组件啦标签需要自动滚动的内容样式#box{width:100%;height:100%;overflow-y:auto;}自动滚动代码functionscroll(bigBox,primary,copy,time){if(bigBox.clientHeight>=primary.scrollHeight){//不需要滚动return;}varnum=0;co
- JS中offsetTop、clientTop、scrollTop、offsetTop各位置属性详解(含示例图)
渔舟唱晚@
javascript前端开发语言
这里是javascript中制作滚动代码的常用属性页可见区域宽:document.body.clientWidth;网页可见区域高:document.body.clientHeight;window.innerHeight;网页可见区域宽:document.body.offsetWidth(包括边线的宽);网页可见区域高:document.body.offsetHeight(包括边线的宽);网页正
- el-scrollbar自动滚动到底部
张滚滚QAQ
vue.jsjavascript前端
内容滚动到底部的方法:chatListScrollBottom(){constelement=document.querySelector('.chatList')constheight=element.offsetHeightthis.$refs['scrollbar'].wrap.scrollTop=height}
- 页面滚动时判断元素是否在可视区域内
wen_文文
Vuevue.js
/***@description:判断dom元素是否在可视区域内*@param:el:Vuecomponnet对象*@returns:true-在可视区域,false:不在可视区域*/exportconstisElementInViewport=function(el){lets=el.$el.offsetTop//元素相对于页面顶部的距离letx=el.$el.offsetHeight//元素自
- 动态获取填充表格数据时的特定值的赋值
TWenYuan
vue.js
1、如图{{scope.$index+1}}详情操作2、注意tableColumns里的formatter:this.keyFormatterdata(){return{activeName:'first',tableHeight:document.body.offsetHeight-310+"px",//展示切换showOptions:{data:{},showList:true,showDet
- JS让页面滚动到底部
若风华浊世间
HTML-前端学习记录
需要让页面直接滚动到底部,按钮点击时调用的方法里面加上这两行就行了vart=document.body.clientHeight;window.scroll({top:t,left:0,behavior:‘smooth’});
- Elementui-plus 实现滚动到底部分页刷新
kangkang-
elementuivue.js前端
1.在这里面用了卡片来实现el-card滚动加载}直接抓住重点,通过@scroll="handleScroll"来实现滚动分页加载数据。2.handleScroll(event){const{target}=event;constthreshold=200;//距离底部100px时开始加载if(!this.loading&&!this.pageTotal&&target.scrollHeight-
- js如何获得浏览器的宽高
恰小面包
javascriptjava开发语言
在JavaScript中,可以使用window对象的innerWidth和innerHeight属性来获取浏览器窗口的宽度和高度,或者使用document.documentElement.clientWidth和document.documentElement.clientHeight来获取视口(viewport)的宽度和高度。以下是具体的代码示例:javascript//获取浏览器窗口的宽度和高
- JS-元素尺寸与位置
小沐°
JSjavascript前端开发语言
通过js的方式,得到元素在页面中的位置获取宽高元素.offsetWidth元素.offsetHeight1)获取元素的自身宽高、包括元素自身设置的宽高+padding+border2)获取出来的是数值,方便计算3)注意:获取的是可视宽高,如果盒子是隐藏的,获取的结果是0获取位置方法一:元素.offsetLeft元素.offsetTop1)获取元素距离自己定位父级元素的左、上距离(与最近一级带有定位
- web前端面试题-JavaScript 第一部分
圣京都
JavaScript面试题javascript
web前端面试题-JavaScript第一部分1JavaScript的组成2JS的基本数据类型和引用数据类型3检测浏览器版本版本有哪些方式?4介绍JS有哪些内置对象?5说几条写JavaScript的基本规范?6如何编写高性能的JavaScript?7DOM元素e的e.getAttribute(propName)和e.propName有什么区别和联系8offsetWidth/offsetHeight
- cell中添加webView获取webView的高度
通哥
CGFloatheight=[[self.webViewstringByEvaluatingJavaScriptFromString:@"document.body.offsetHeight"]floatValue];
- 写一个判断鼠标进入方向切换图片的效果
_GuGu_
计算机外设前端javascript
直接看代码:import{onMounted,ref}from'vue';importgsapfrom'gsap'constmouse=ref(null)//拿到鼠标的进入事件//监听鼠标进入事件consthandleMouse=(e)=>{consttheta=Math.atan2(mouse.value.offsetHeight,mouse.value.offsetWidth)constang
- js动画html标签(持续更新中)
843977358
htmljs动画mediaopacity
1.jQuery 效果 - animate() 方法 改变 "div" 元素的高度: $(".btn1").click(function(){ $("#box").animate({height:"300px
- springMVC学习笔记
caoyong
springMVC
1、搭建开发环境
a>、添加jar文件,在ioc所需jar包的基础上添加spring-web.jar,spring-webmvc.jar
b>、在web.xml中配置前端控制器
<servlet>
&nbs
- POI中设置Excel单元格格式
107x
poistyle列宽合并单元格自动换行
引用:http://apps.hi.baidu.com/share/detail/17249059
POI中可能会用到一些需要设置EXCEL单元格格式的操作小结:
先获取工作薄对象:
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet();
HSSFCellStyle setBorder = wb.
- jquery 获取A href 触发js方法的this参数 无效的情况
一炮送你回车库
jquery
html如下:
<td class=\"bord-r-n bord-l-n c-333\">
<a class=\"table-icon edit\" onclick=\"editTrValues(this);\">修改</a>
</td>"
j
- md5
3213213333332132
MD5
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
public class MDFive {
public static void main(String[] args) {
String md5Str = "cq
- 完全卸载干净Oracle11g
sophia天雪
orale数据库卸载干净清理注册表
完全卸载干净Oracle11g
A、存在OUI卸载工具的情况下:
第一步:停用所有Oracle相关的已启动的服务;
第二步:找到OUI卸载工具:在“开始”菜单中找到“oracle_OraDb11g_home”文件夹中
&
- apache 的access.log 日志文件太大如何解决
darkranger
apache
CustomLog logs/access.log common 此写法导致日志数据一致自增变大。
直接注释上面的语法
#CustomLog logs/access.log common
增加:
CustomLog "|bin/rotatelogs.exe -l logs/access-%Y-%m-d.log 
- Hadoop单机模式环境搭建关键步骤
aijuans
分布式
Hadoop环境需要sshd服务一直开启,故,在服务器上需要按照ssh服务,以Ubuntu Linux为例,按照ssh服务如下:
sudo apt-get install ssh
sudo apt-get install rsync
编辑HADOOP_HOME/conf/hadoop-env.sh文件,将JAVA_HOME设置为Java
- PL/SQL DEVELOPER 使用的一些技巧
atongyeye
javasql
1 记住密码
这是个有争议的功能,因为记住密码会给带来数据安全的问题。 但假如是开发用的库,密码甚至可以和用户名相同,每次输入密码实在没什么意义,可以考虑让PLSQL Developer记住密码。 位置:Tools菜单--Preferences--Oracle--Logon HIstory--Store with password
2 特殊Copy
在SQL Window
- PHP:在对象上动态添加一个新的方法
bardo
方法动态添加闭包
有关在一个对象上动态添加方法,如果你来自Ruby语言或您熟悉这门语言,你已经知道它是什么...... Ruby提供给你一种方式来获得一个instancied对象,并给这个对象添加一个额外的方法。
好!不说Ruby了,让我们来谈谈PHP
PHP未提供一个“标准的方式”做这样的事情,这也是没有核心的一部分...
但无论如何,它并没有说我们不能做这样
- ThreadLocal与线程安全
bijian1013
javajava多线程threadLocal
首先来看一下线程安全问题产生的两个前提条件:
1.数据共享,多个线程访问同样的数据。
2.共享数据是可变的,多个线程对访问的共享数据作出了修改。
实例:
定义一个共享数据:
public static int a = 0;
- Tomcat 架包冲突解决
征客丶
tomcatWeb
环境:
Tomcat 7.0.6
win7 x64
错误表象:【我的冲突的架包是:catalina.jar 与 tomcat-catalina-7.0.61.jar 冲突,不知道其他架包冲突时是不是也报这个错误】
严重: End event threw exception
java.lang.NoSuchMethodException: org.apache.catalina.dep
- 【Scala三】分析Spark源代码总结的Scala语法一
bit1129
scala
Scala语法 1. classOf运算符
Scala中的classOf[T]是一个class对象,等价于Java的T.class,比如classOf[TextInputFormat]等价于TextInputFormat.class
2. 方法默认值
defaultMinPartitions就是一个默认值,类似C++的方法默认值
- java 线程池管理机制
BlueSkator
java线程池管理机制
编辑
Add
Tools
jdk线程池
一、引言
第一:降低资源消耗。通过重复利用已创建的线程降低线程创建和销毁造成的消耗。第二:提高响应速度。当任务到达时,任务可以不需要等到线程创建就能立即执行。第三:提高线程的可管理性。线程是稀缺资源,如果无限制的创建,不仅会消耗系统资源,还会降低系统的稳定性,使用线程池可以进行统一的分配,调优和监控。
- 关于hql中使用本地sql函数的问题(问-答)
BreakingBad
HQL存储函数
转自于:http://www.iteye.com/problems/23775
问:
我在开发过程中,使用hql进行查询(mysql5)使用到了mysql自带的函数find_in_set()这个函数作为匹配字符串的来讲效率非常好,但是我直接把它写在hql语句里面(from ForumMemberInfo fm,ForumArea fa where find_in_set(fm.userId,f
- 读《研磨设计模式》-代码笔记-迭代器模式-Iterator
bylijinnan
java设计模式
声明: 本文只为方便我个人查阅和理解,详细的分析以及源代码请移步 原作者的博客http://chjavach.iteye.com/
import java.util.Arrays;
import java.util.List;
/**
* Iterator模式提供一种方法顺序访问一个聚合对象中各个元素,而又不暴露该对象内部表示
*
* 个人觉得,为了不暴露该
- 常用SQL
chenjunt3
oraclesqlC++cC#
--NC建库
CREATE TABLESPACE NNC_DATA01 DATAFILE 'E:\oracle\product\10.2.0\oradata\orcl\nnc_data01.dbf' SIZE 500M AUTOEXTEND ON NEXT 50M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 256K ;
CREATE TABLESPA
- 数学是科学技术的语言
comsci
工作活动领域模型
从小学到大学都在学习数学,从小学开始了解数字的概念和背诵九九表到大学学习复变函数和离散数学,看起来好像掌握了这些数学知识,但是在工作中却很少真正用到这些知识,为什么?
最近在研究一种开源软件-CARROT2的源代码的时候,又一次感觉到数学在计算机技术中的不可动摇的基础作用,CARROT2是一种用于自动语言分类(聚类)的工具性软件,用JAVA语言编写,它
- Linux系统手动安装rzsz 软件包
daizj
linuxszrz
1、下载软件 rzsz-3.34.tar.gz。登录linux,用命令
wget http://freeware.sgi.com/source/rzsz/rzsz-3.48.tar.gz下载。
2、解压 tar zxvf rzsz-3.34.tar.gz
3、安装 cd rzsz-3.34 ; make posix 。注意:这个软件安装与常规的GNU软件不
- 读源码之:ArrayBlockingQueue
dieslrae
java
ArrayBlockingQueue是concurrent包提供的一个线程安全的队列,由一个数组来保存队列元素.通过
takeIndex和
putIndex来分别记录出队列和入队列的下标,以保证在出队列时
不进行元素移动.
//在出队列或者入队列的时候对takeIndex或者putIndex进行累加,如果已经到了数组末尾就又从0开始,保证数
- C语言学习九枚举的定义和应用
dcj3sjt126com
c
枚举的定义
# include <stdio.h>
enum WeekDay
{
MonDay, TuesDay, WednesDay, ThursDay, FriDay, SaturDay, SunDay
};
int main(void)
{
//int day; //day定义成int类型不合适
enum WeekDay day = Wedne
- Vagrant 三种网络配置详解
dcj3sjt126com
vagrant
Forwarded port
Private network
Public network
Vagrant 中一共有三种网络配置,下面我们将会详解三种网络配置各自优缺点。
端口映射(Forwarded port),顾名思义是指把宿主计算机的端口映射到虚拟机的某一个端口上,访问宿主计算机端口时,请求实际是被转发到虚拟机上指定端口的。Vagrantfile中设定语法为:
c
- 16.性能优化-完结
frank1234
性能优化
性能调优是一个宏大的工程,需要从宏观架构(比如拆分,冗余,读写分离,集群,缓存等), 软件设计(比如多线程并行化,选择合适的数据结构), 数据库设计层面(合理的表设计,汇总表,索引,分区,拆分,冗余等) 以及微观(软件的配置,SQL语句的编写,操作系统配置等)根据软件的应用场景做综合的考虑和权衡,并经验实际测试验证才能达到最优。
性能水很深, 笔者经验尚浅 ,赶脚也就了解了点皮毛而已,我觉得
- Word Search
hcx2013
search
Given a 2D board and a word, find if the word exists in the grid.
The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or ve
- Spring4新特性——Web开发的增强
jinnianshilongnian
springspring mvcspring4
Spring4新特性——泛型限定式依赖注入
Spring4新特性——核心容器的其他改进
Spring4新特性——Web开发的增强
Spring4新特性——集成Bean Validation 1.1(JSR-349)到SpringMVC
Spring4新特性——Groovy Bean定义DSL
Spring4新特性——更好的Java泛型操作API
Spring4新
- CentOS安装配置tengine并设置开机启动
liuxingguome
centos
yum install gcc-c++
yum install pcre pcre-devel
yum install zlib zlib-devel
yum install openssl openssl-devel
Ubuntu上可以这样安装
sudo aptitude install libdmalloc-dev libcurl4-opens
- 第14章 工具函数(上)
onestopweb
函数
index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/
- Xelsius 2008 and SAP BW at a glance
blueoxygen
BOXelsius
Xelsius提供了丰富多样的数据连接方式,其中为SAP BW专属提供的是BICS。那么Xelsius的各种连接的优缺点比较以及Xelsius是如何直接连接到BEx Query的呢? 以下Wiki文章应该提供了全面的概览。
http://wiki.sdn.sap.com/wiki/display/BOBJ/Xcelsius+2008+and+SAP+NetWeaver+BW+Co
- oracle表空间相关
tongsh6
oracle
在oracle数据库中,一个用户对应一个表空间,当表空间不足时,可以采用增加表空间的数据文件容量,也可以增加数据文件,方法有如下几种:
1.给表空间增加数据文件
ALTER TABLESPACE "表空间的名字" ADD DATAFILE
'表空间的数据文件路径' SIZE 50M;
&nb
- .Net framework4.0安装失败
yangjuanjava
.netwindows
上午的.net framework 4.0,各种失败,查了好多答案,各种不靠谱,最后终于找到答案了
和Windows Update有关系,给目录名重命名一下再次安装,即安装成功了!
下载地址:http://www.microsoft.com/en-us/download/details.aspx?id=17113
方法:
1.运行cmd,输入net stop WuAuServ
2.点击开