界面自動適應高度和寬度

超出頁面自動增加滾動條el-table、div等

 

 <div class="applicationTable" style="width: 100%; height: calc(100vh - 320px)">

</div>

 

固定高度

height="560px"

style="width: 100%"

 <el-table
          v-loading="isShowClassifyLoading"
          :data="gridList"
          stripe
          height="560px"
          style="width: 100%"
          :default-sort = "{prop: 'createdDate', order: 'descending'}"
           >
          <el-table-column
            align="center"
            prop="resApplyName"
            label="記錄名稱"
            show-overflow-tooltip="true">
          </el-table-column>
          <el-table-column
            align="center"
            prop="createdDate"
            label="創建時間"
            show-overflow-tooltip="true">
          </el-table-column>
 </el-table>

自適應

style="width: 100%; height: calc(100vh - 320px)"

 

 <el-table
          v-loading="isShowClassifyLoading"
          :data="gridList"
          stripe
          style="width: 100%; height: calc(100vh - 320px)"
          :default-sort = "{prop: 'createdDate', order: 'descending'}"
           >
          <el-table-column
            align="center"
            prop="resApplyName"
            label="記錄名稱"
            show-overflow-tooltip="true">
          </el-table-column>
          <el-table-column
            align="center"
            prop="createdDate"
            label="創建時間"
            show-overflow-tooltip="true">
          </el-table-column>
 </el-table>

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章