diff --git a/src/assets/scss/global.scss b/src/assets/scss/global.scss index 4379954..0de5729 100644 --- a/src/assets/scss/global.scss +++ b/src/assets/scss/global.scss @@ -522,3 +522,19 @@ input[type="number"] { height: auto; line-height: 1.5; } + +.full-block{ + height:100%; + width:100%; + overflow:hidden; +} +.flex-layout{ + display:flex; + flex-direction:column; +} +.flex-auto{ + flex:1 1 auto +} +.flex-none{ + flex:none +} diff --git a/src/views/modules/base/laborClass.vue b/src/views/modules/base/laborClass.vue index d56dac6..bb6fa97 100644 --- a/src/views/modules/base/laborClass.vue +++ b/src/views/modules/base/laborClass.vue @@ -5,12 +5,12 @@ export default { name: "laborClass", props:{ height:{ - type: [Number,String], - default: '78vh' + type: [Number], } }, data(){ return{ + scrollHeight:0, dataList:[], queryLoading:false, laborClass:{ @@ -172,6 +172,9 @@ export default { } } }) + }, + setScrollHeight(){ + this.scrollHeight = window.innerHeight-120 } }, watch:{ @@ -188,46 +191,55 @@ export default { this.saveLoading = false; },5000) } - } + }, }, created() { this.handleQuery(); + if (!this.height){ + this.setScrollHeight() + window.addEventListener('resize',this.setScrollHeight) + }else { + this.scrollHeight = this.height + } + }, + destroyed() { + window.removeEventListener('resize',this.setScrollHeight) } }