Commit b08bd8a8e2d62e942d347cd94717626e3413e179

Authored by huanghong
1 parent e399c5e9

fixed height changed

examples/routers/table.vue
@@ -18,7 +18,8 @@ @@ -18,7 +18,8 @@
18 <Table :width='500' :height='200' border :columns="columns2" :data="data3"></Table> 18 <Table :width='500' :height='200' border :columns="columns2" :data="data3"></Table>
19 </div> 19 </div>
20 <div style='margin:20px 0px;'> 20 <div style='margin:20px 0px;'>
21 - <Table :data="tableData1" :columns="tableColumns1" :height='500' stripe size='small'></Table> 21 + Table scrolling <i-switch v-model="fixedHeader" style="margin-right: 5px"></i-switch>
  22 + <Table :data="tableData1" :columns="tableColumns1" :height="fixedHeader ? 250 : ''" stripe size='small'></Table>
22 <div style="margin: 10px;overflow: hidden"> 23 <div style="margin: 10px;overflow: hidden">
23 <div style="float: right;"> 24 <div style="float: right;">
24 <Page :total="100" show-sizer :current="1" @on-change="changePage"></Page> 25 <Page :total="100" show-sizer :current="1" @on-change="changePage"></Page>
@@ -151,6 +152,7 @@ @@ -151,6 +152,7 @@
151 } 152 }
152 ], 153 ],
153 154
  155 + fixedHeader: false,
154 tableData1: [], 156 tableData1: [],
155 tableColumns1: [ 157 tableColumns1: [
156 { 158 {
src/components/table/table.vue
@@ -835,6 +835,7 @@ @@ -835,6 +835,7 @@
835 deep: true 835 deep: true
836 }, 836 },
837 height () { 837 height () {
  838 + this.handleResize();
838 this.fixedHeader(); 839 this.fixedHeader();
839 } 840 }
840 } 841 }