Commit b08bd8a8e2d62e942d347cd94717626e3413e179

Authored by huanghong
1 parent e399c5e9

fixed height changed

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