pagelistbox.vue
1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<style>
#pagelistbox{top:0px;margin-top:0px;position:absolute;right: 0px;
left: 0px;}
.ctable .row-launch{display: block;}
</style>
<template>
<div class="row-launch " id="pagelistbox" v-show="row.pagebool"
v-bind:style="{top:row.rownum*row.rowheight+'px'}"
>
<table class="itable itable-td-long-text">
<thead >
<tr >
<th class="{{ks.split('/')[1]}}" v-for="ks in keys">
{{ks.split('/')[0]}}
</th>
</tr>
</thead>
<tbody>
<tr v-for="item in list">
<td v-for="ks in keys">
{{item[ks.split('/')[2]]}}
</td>
</tr>
</tbody>
</table>
<pagination @page-change="getData" :class="['page-line']"
:page-no.sync="row.pagenum" :total-pages.sync="row.pagetotal">
</pagination>
<div class="zip" v-on:click="hide"
style="position:relative;bottom:auto;left:auto;margin:0px auto;"></div>
</div>
</template>
<script>
module.exports={
props:{
list:Array,row:Object,keys:Array
},
data:function(){
return {}
},methods:{
hide:function(){
this.row.id='';
this.row.pagebool=0;
},getData:function(){
this.$emit('reload')
}
},watch:{
'list':function(val,old){
this.row.boxheight=this.$el.offsetHeight+5+'px'
}
}
}
</script>