tableH mix
This commit is contained in:
parent
f043a6a0a2
commit
b3623d29c5
20
src/mixins/tableHeightMixin.js
Normal file
20
src/mixins/tableHeightMixin.js
Normal file
@ -0,0 +1,20 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableH: this.tableHeight(260),
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.tableH = this?.heightNum ? this.tableHeight(this.heightNum) : this.tableHeight(260);
|
||||
window.addEventListener('resize', this._setTableHeight);
|
||||
},
|
||||
destroyed() {
|
||||
window.removeEventListener('resize', this._setTableHeight);
|
||||
},
|
||||
methods: {
|
||||
_setTableHeight() {
|
||||
this.tableH = this?.heightNum ? this.tableHeight(this.heightNum) : this.tableHeight(260);
|
||||
// this.tableH = this.tableHeight(260);
|
||||
},
|
||||
},
|
||||
};
|
@ -12,7 +12,8 @@
|
||||
:page="queryParams.pageNo"
|
||||
:limit="queryParams.pageSize"
|
||||
:table-data="list"
|
||||
@emitFun="handleEmitFun">
|
||||
@emitFun="handleEmitFun"
|
||||
:max-height="tableH">
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
@ -86,10 +87,11 @@ import {
|
||||
exportQualityInspectionTypeExcel,
|
||||
} from '@/api/base/qualityInspectionType';
|
||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||
import tableHeightMixin from '@/mixins/tableHeightMixin';
|
||||
|
||||
export default {
|
||||
name: 'QualityInspectionType',
|
||||
mixins: [basicPageMixin],
|
||||
mixins: [basicPageMixin, tableHeightMixin],
|
||||
data() {
|
||||
return {
|
||||
tableBtn: [
|
||||
|
Loading…
Reference in New Issue
Block a user