zhangxiaoxu123456
2022-04-27 b55d1c67769dcc8d90eed2bb4f8a7dfd51e7303a
src/pages/components/shebaoZhengjiShouru/shebaoZhengjiShouruForm.vue
@@ -3,6 +3,7 @@
    <div class="danwei-box">单位:人</div>
    <div class="shebaoZhengjiShouruForm-table">
      <el-table
        :cell-style="handleCellStyle"
        :max-height="tableHeight"
        border
        style="width: 100%"
@@ -50,13 +51,18 @@
        },
        data() {
            return {
                tableHeight: window.innerHeight - nowSize(350)
                tableHeight: window.innerHeight - nowSize(380)
            }
        },
        methods: {
            getHeight() {
                this.tableHeight = window.innerHeight - nowSize(350)
            }
            },
            handleCellStyle({rowIndex, columnIndex}) {
                if(columnIndex == 0) {
                    return { background:'#51D2FF' }
                }
            },
        },
        created() {
            window.addEventListener('resize', this.getHeight)