perf: 补上loading、统一table的滚动条尺寸

This commit is contained in:
陈劲松
2020-04-19 21:48:03 +08:00
parent ac72c455c7
commit eaf40a03db
22 changed files with 96 additions and 29 deletions

View File

@@ -45,7 +45,8 @@
</button>
</div>
</div>
<el-table :data="tableData" border :height="$tableHeight.normal" style="width: 100%;" ref="modelTable" class="nz-table" v-scrollBar:el-table :cell-class-name="assetStatClassName">
<el-table :data="tableData" border :height="$tableHeight.normal" style="width: 100%;" ref="modelTable" class="nz-table" v-scrollBar:el-table="'large'"
v-loading="loading" :cell-class-name="assetStatClassName">
<el-table-column :resizable="false" v-for="(item, index) in tablelable" v-if="item.show" :width="item.width"
:key="`col-${index}`" :label="item.label">
<template slot-scope="scope" :column="item">
@@ -119,6 +120,7 @@
pageSize: 20,
total: 0
},
loading: false,
tableTitle: [
{
label: 'ID',
@@ -256,7 +258,9 @@
this.$set(this.searchLabel, "pageNo", this.pageObj.pageNo);
this.$set(this.searchLabel, "pageSize", this.pageObj.pageSize);
this.$set(this.searchLabel, "stat", 1);
this.loading = true;
this.$get('model', this.searchLabel).then(response => {
this.loading = false;
if (response.code === 200) {
this.tableData = response.data.list;
this.pageObj.total = response.data.total