提交 78342176 编写于 作者: guangjun.yang's avatar guangjun.yang

高度设置问题

上级 297ed97b
...@@ -7,7 +7,8 @@ export const containObject = function(...obj1) { ...@@ -7,7 +7,8 @@ export const containObject = function(...obj1) {
// 获取页面自适应高度 // 获取页面自适应高度
export function resizeHeight(cMinusHeight = 152, iMinuxHeight = 210, refHeightId = 'slidebar-container', export function resizeHeight(cMinusHeight = 152, iMinuxHeight = 210, refHeightId = 'slidebar-container',
containerHeightId = 'screenSet'){ containerHeightId = 'screenSet'){
let containerHeight = p_getElm(refHeightId).getBoundingClientRect().height - 15; // let containerHeight = p_getElm(refHeightId).getBoundingClientRect().height - 15;
let containerHeight = document.body.clientHeight - 80;
p_getElm(containerHeightId).style.height = containerHeight - cMinusHeight + 'px'; p_getElm(containerHeightId).style.height = containerHeight - cMinusHeight + 'px';
window.onresize = function() { window.onresize = function() {
if(p_getElm(refHeightId) && p_getElm(containerHeightId)) { if(p_getElm(refHeightId) && p_getElm(containerHeightId)) {
......
...@@ -307,11 +307,6 @@ export default { ...@@ -307,11 +307,6 @@ export default {
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
// let containerHeight = 500, slidebarContainer = _this.getElmByID('slidebar-container');
// if(slidebarContainer) {
// containerHeight =
// _this.getElmByID('slidebar-container').getBoundingClientRect().height - 15;
// }
_this.containerHeight = document.body.clientHeight - 80; _this.containerHeight = document.body.clientHeight - 80;
_this.getElmByID('screenSet').style.height = _this.getElmByID('screenSet').style.height =
_this.containerHeight - 152 + "px"; _this.containerHeight - 152 + "px";
......
...@@ -94,7 +94,8 @@ export default { ...@@ -94,7 +94,8 @@ export default {
let _this = this; let _this = this;
setTimeout(() => { setTimeout(() => {
let el = _this.getElmByID('scroll-set'); let el = _this.getElmByID('scroll-set');
_this.containerHeight = _this.getElmByID('slidebar-container').getBoundingClientRect().height - 15; // _this.containerHeight = _this.getElmByID('slidebar-container').getBoundingClientRect().height - 15;
_this.containerHeight = document.body.clientHeight - 80;
_this.getElmByID('scroll-set').style.height = _this.containerHeight - 152 + "px"; _this.getElmByID('scroll-set').style.height = _this.containerHeight - 152 + "px";
if(_this.hasSearchDate) { // 有查询日期 滚动条最顶部 if(_this.hasSearchDate) { // 有查询日期 滚动条最顶部
el.scrollTop = 10; el.scrollTop = 10;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册