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"
|
:page="queryParams.pageNo"
|
||||||
:limit="queryParams.pageSize"
|
:limit="queryParams.pageSize"
|
||||||
:table-data="list"
|
:table-data="list"
|
||||||
@emitFun="handleEmitFun">
|
@emitFun="handleEmitFun"
|
||||||
|
:max-height="tableH">
|
||||||
<method-btn
|
<method-btn
|
||||||
v-if="tableBtn.length"
|
v-if="tableBtn.length"
|
||||||
slot="handleBtn"
|
slot="handleBtn"
|
||||||
@ -86,10 +87,11 @@ import {
|
|||||||
exportQualityInspectionTypeExcel,
|
exportQualityInspectionTypeExcel,
|
||||||
} from '@/api/base/qualityInspectionType';
|
} from '@/api/base/qualityInspectionType';
|
||||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
|
import tableHeightMixin from '@/mixins/tableHeightMixin';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'QualityInspectionType',
|
name: 'QualityInspectionType',
|
||||||
mixins: [basicPageMixin],
|
mixins: [basicPageMixin, tableHeightMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
|
Loading…
Reference in New Issue
Block a user