Commit 6bc3b19f22f3fd600fcfea71a29c7707f39f99b1

Authored by Aresn
Committed by GitHub
2 parents c1a197ab 944c0dac

Merge pull request #3175 from huanghong1125/input-number-empty

update dropdown
examples/routers/page.vue
... ... @@ -5,6 +5,25 @@
5 5 <Button type="primary" @click="subject">- 1</Button>
6 6 <Button type="primary" @click="change">Change</Button>
7 7 <Page :current="2" :total="50" simple></Page>
  8 +
  9 + <div style="margin:10px 0px">
  10 + <Page :total="1000" show-sizer show-elevator show-total transfer :current="12"></Page>
  11 + </div>
  12 + <div style="margin:10px 0px">
  13 + <Page :total="1000" show-sizer show-elevator show-total transfer :current="12"></Page>
  14 + </div>
  15 + <div style="margin:100px 0px">
  16 + <Page :total="500" show-sizer show-elevator show-total transfer ></Page>
  17 + </div>
  18 + <div style="margin:100px 0px">
  19 + <Page :total="500" show-sizer show-elevator transfer ></Page>
  20 + </div>
  21 + <div style="margin:100px 0px">
  22 + <Page :total="500" show-sizer show-elevator transfer ></Page>
  23 + </div>
  24 + <div style="margin:10px 0px">
  25 + <Page :total="500" show-sizer transfer ></Page>
  26 + </div>
8 27 </div>
9 28 </template>
10 29 <script>
... ...
examples/routers/table.vue
... ... @@ -5,6 +5,14 @@
5 5 <Button @click="handleClearData">Clear Data</Button>
6 6 <Button @click="handleSelectAll(true)">Set all selected</Button>
7 7 <Button @click="handleSelectAll(false)">Cancel all selected</Button>
  8 + <div style="margin:20px 0px;">
  9 + <Table :data="tableData1" :columns="tableColumns1" style="width: 100%;" stripe></Table>
  10 + <div style="margin: 10px;overflow: hidden">
  11 + <div style="float: right;">
  12 + <Page :total="100" show-sizer :current="1" @on-change="changePage"></Page>
  13 + </div>
  14 + </div>
  15 + </div>
8 16 </div>
9 17 </template>
10 18 <script>
... ... @@ -32,9 +40,40 @@
32 40 ],
33 41 data1: [
34 42  
  43 + ],
  44 +
  45 + tableData1: [],
  46 + tableColumns1: [
  47 + {
  48 + title: 'Data1',
  49 + key: 'data1'
  50 + },
  51 + {
  52 + title: 'Data2',
  53 + key: 'data2'
  54 + },
  55 + {
  56 + title: 'Data3',
  57 + key: 'data3'
  58 + },
  59 + {
  60 + title: 'Data4',
  61 + key: 'data4'
  62 + },
  63 + {
  64 + title: 'Data5',
  65 + key: 'data5'
  66 + },
  67 + {
  68 + title: 'Data6',
  69 + key: 'data6'
  70 + },
35 71 ]
36 72 }
37 73 },
  74 + mounted(){
  75 + this.refreshData();
  76 + },
38 77 methods: {
39 78 handleSelectAll (status) {
40 79 this.$refs.selection.selectAll(status);
... ... @@ -69,6 +108,23 @@
69 108 },
70 109 handleClearData () {
71 110 this.data1 = [];
  111 + },
  112 + refreshData(){
  113 + let data = [];
  114 + for (let i = 0; i < 10; i++) {
  115 + data.push({
  116 + data1: Math.floor(Math.random () * 10000),
  117 + data2: Math.floor(Math.random () * 1000000),
  118 + data3: Math.floor(Math.random () * 100000000),
  119 + data4: Math.floor(Math.random () * Math.random () * 10000),
  120 + data5: Math.floor(Math.random () * Math.random () * 1000000),
  121 + data6: Math.floor(Math.random () * Math.random () * 100000000),
  122 + });
  123 + }
  124 + this.tableData1 = data;
  125 + },
  126 + changePage(){
  127 + this.refreshData();
72 128 }
73 129 }
74 130 }
... ...
src/components/select/dropdown.vue
... ... @@ -49,6 +49,7 @@
49 49 },
50 50 onCreate:()=>{
51 51 this.resetTransformOrigin();
  52 + this.$nextTick(this.popper.update());
52 53 },
53 54 onUpdate:()=>{
54 55 this.resetTransformOrigin();
... ...