perf: 修复endpointquery有时候空白的问题
This commit is contained in:
@@ -265,12 +265,13 @@
|
||||
});
|
||||
},
|
||||
tableReload() {
|
||||
this.tableShow = false;
|
||||
setTimeout(() => {
|
||||
this.tableShow = true;
|
||||
//this.queryEndpoint();
|
||||
}, 300);
|
||||
//this.$nextTick(() => {this.tableShow = true});
|
||||
var table = this.$refs.endpointQueryTable;
|
||||
let resizeTimeout = setInterval(() => {
|
||||
if (!window.resizing) {
|
||||
table.setHeight();
|
||||
clearInterval(resizeTimeout);
|
||||
}
|
||||
}, 200);
|
||||
},
|
||||
queryEndpoint() {
|
||||
this.loading = true;
|
||||
@@ -684,6 +685,7 @@
|
||||
mounted() {
|
||||
this.getPanelData();
|
||||
//this.$nextTick(() => {
|
||||
setTimeout(() => {this.$refs.endpointQueryTable.setHeight();}, 700);
|
||||
setTimeout(() => {
|
||||
//绑定滚动条事件,控制top按钮
|
||||
let el = this.$refs.endpointQueryTable.$el.querySelector(".el-table__body-wrapper");
|
||||
|
||||
@@ -99,7 +99,7 @@ Vue.use(plTable);
|
||||
/*指令*/
|
||||
Vue.directive('clickoutside', clickoutside);
|
||||
Vue.directive('scrollBar', scrollBar);
|
||||
|
||||
window.resizing = false;
|
||||
window.vm = new Vue({
|
||||
el: '#app',
|
||||
router,
|
||||
|
||||
@@ -183,6 +183,7 @@ export const scrollBar = {
|
||||
export const bottomBoxWindow = {
|
||||
// 鼠标拖动二级列表
|
||||
listResize(vm, e) {
|
||||
window.resizing = true;
|
||||
let mainListDom = document.querySelector(".main-list-with-sub"); //主列表
|
||||
let subListDom = document.querySelector(".sub-list"); //副列表
|
||||
let contentRightDom = document.querySelector(".content-right"); //右侧内容区
|
||||
@@ -194,6 +195,7 @@ export const bottomBoxWindow = {
|
||||
let mouseInitialY = e.clientY;
|
||||
|
||||
document.onmousemove = (e) => {
|
||||
window.resizing = true;
|
||||
mainListDom.classList.remove('main-and-sub-transition');
|
||||
subListDom.classList.remove('main-and-sub-transition');
|
||||
e.preventDefault();
|
||||
@@ -213,17 +215,17 @@ export const bottomBoxWindow = {
|
||||
subListDom.style.height = subInitialHeight-mouseMoveY+'px';
|
||||
}
|
||||
|
||||
// 主、副列表最小高度限制为15px
|
||||
if(parseInt(mainListDom.style.height) >= contentRightHeight-15){
|
||||
// 主、副列表最小高度限制为15px; 23是因为拖动区域有8的高度
|
||||
if(parseInt(mainListDom.style.height) > contentRightHeight-23){
|
||||
vm.toTopBtnTop = contentRightHeight+5+'px';
|
||||
mainListDom.style.height = contentRightHeight-15+'px';
|
||||
mainListDom.style.height = contentRightHeight-23+'px';
|
||||
}
|
||||
if(parseInt(mainListDom.style.height) <= 15){
|
||||
vm.toTopBtnTop = '35px';
|
||||
mainListDom.style.height = '15px';
|
||||
}
|
||||
if(parseInt(subListDom.style.height) >= contentRightHeight-15){
|
||||
subListDom.style.height = contentRightHeight-15+'px';
|
||||
if(parseInt(subListDom.style.height) > contentRightHeight-23){
|
||||
subListDom.style.height = contentRightHeight-23+'px';
|
||||
}
|
||||
if(parseInt(subListDom.style.height) <= 15){
|
||||
subListDom.style.height = '15px';
|
||||
@@ -249,6 +251,7 @@ export const bottomBoxWindow = {
|
||||
}
|
||||
};
|
||||
document.onmouseup = () => {
|
||||
window.resizing = false;
|
||||
mainListDom.classList.add('main-and-sub-transition');
|
||||
subListDom.classList.add('main-and-sub-transition');
|
||||
document.onmousemove = null;
|
||||
|
||||
Reference in New Issue
Block a user