pagelistbox.vue 1.41 KB
<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>