refactor: 代码小优化

This commit is contained in:
meilin.huang
2023-08-16 17:37:33 +08:00
parent 3ae7e0de75
commit 24b46b1133
9 changed files with 69 additions and 31 deletions

View File

@@ -314,8 +314,16 @@ onMounted(() => {
} else {
state.inputWidth = props.inputWidth;
}
window.addEventListener('resize', () => {
calcuTableHeight();
});
})
const calcuTableHeight = () => {
state.tableMaxHeight = window.innerHeight - 240 + 'px';
}
const formatText = (data: any)=> {
state.formatVal = '';
try {
@@ -362,7 +370,7 @@ const reset = () => {
for (let qi of props.query) {
state.queryForm[qi.prop] = null;
}
console.log(state.queryForm);
changePageNum(1);
emit('update:queryForm', state.queryForm);
execQuery();