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

其它页面高度设置问题

上级 78342176
...@@ -42,38 +42,10 @@ function getUrlParmByCode(paramList) { ...@@ -42,38 +42,10 @@ function getUrlParmByCode(paramList) {
return '' return ''
} }
// 计算高度
export function resizeHeight(cMinusHeight = 152, iMinuxHeight = 210, refHeightId = 'sidebarWrapperId',
containerHeightId = 'appContainerId', innerHeightId = 'elTableId'){
// if (!p_getElm(refHeightId) || !p_getElm(containerHeightId) || !p_getElm(innerHeightId)) {
// // window.onresize = null
// console.warn('No certain dom id!!!');
// }
let containerHeight = document.body.clientHeight - 80;
// let containerHeight = p_getElm(refHeightId).getBoundingClientRect().height - 50
p_getElm(containerHeightId).style.height = containerHeight - cMinusHeight + 'px'
p_getElm(innerHeightId).style.height = containerHeight - iMinuxHeight + 'px'
if(p_getElm('elTableIdInner')){
p_getElm('elTableIdInner').style.height = containerHeight - iMinuxHeight + 'px'
}
window.onresize = function() {
containerHeight = p_getElm(refHeightId).getBoundingClientRect().height - 50
p_getElm(containerHeightId).style.height = containerHeight - cMinusHeight + 'px'
p_getElm(innerHeightId).style.height = containerHeight - iMinuxHeight + 'px'
if (p_getElm('elTableIdInner')) {
p_getElm('elTableIdInner').style.height = containerHeight - iMinuxHeight + 'px'
}
}
}
function p_getElm(elmId) { function p_getElm(elmId) {
return document.getElementById(elmId) return document.getElementById(elmId)
} }
export function deepCopy(obj) { export function deepCopy(obj) {
var result = Array.isArray(obj) ? [] : {}; var result = Array.isArray(obj) ? [] : {};
for (var key in obj) { for (var key in obj) {
......
...@@ -105,7 +105,7 @@ export default { ...@@ -105,7 +105,7 @@ export default {
}, },
// 挂载到Dom完成时 // 挂载到Dom完成时
mounted() { mounted() {
commonUtil.resizeHeight(); commonUtil.resizeHeight(92);
this.search(); this.search();
}, },
methods: { methods: {
......
...@@ -114,7 +114,7 @@ export default { ...@@ -114,7 +114,7 @@ export default {
}, },
// 挂载到Dom完成时 // 挂载到Dom完成时
mounted() { mounted() {
commonUtil.resizeHeight(); commonUtil.resizeHeight(92);
this.getFiveContentList(); this.getFiveContentList();
}, },
methods: { methods: {
......
...@@ -203,7 +203,6 @@ import { ...@@ -203,7 +203,6 @@ import {
closeLoading, closeLoading,
betaHandle, betaHandle,
} from "@/utils/utils"; } from "@/utils/utils";
import * as commonUtil from "@/utils/utils";
import { getPicaKFAccid, getPhomeDemain } from "@/utils"; import { getPicaKFAccid, getPhomeDemain } from "@/utils";
import UserInfo from "@/components/IM/user-info.vue"; import UserInfo from "@/components/IM/user-info.vue";
// const CONTAINER_HEIGHT = 300; // const CONTAINER_HEIGHT = 300;
......
...@@ -56,7 +56,6 @@ import BreadCrumb from "@/components/breadcrumb.vue"; ...@@ -56,7 +56,6 @@ import BreadCrumb from "@/components/breadcrumb.vue";
import { doUpload, getFilePath } from "@/utils/qiniu-util"; import { doUpload, getFilePath } from "@/utils/qiniu-util";
import { openLoading, closeLoading, betaHandle, timeHandle } from "@/utils/utils"; import { openLoading, closeLoading, betaHandle, timeHandle } from "@/utils/utils";
import { getPicaKFAccid } from "@/utils"; import { getPicaKFAccid } from "@/utils";
// import * as commonUtil from "@/utils/utils";
export default { export default {
components: { components: {
BreadCrumb BreadCrumb
......
...@@ -108,7 +108,7 @@ export default { ...@@ -108,7 +108,7 @@ export default {
}, },
// 挂载到Dom完成时 // 挂载到Dom完成时
mounted() { mounted() {
commonUtil.resizeHeight(); commonUtil.resizeHeight(92);
this.searchMessage(); this.searchMessage();
}, },
methods: { methods: {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册