<template>
  <div> 
    <el-drawer :visible.sync="visible" append-to-body size="50%">
      
    </el-drawer>
    <slot name="input"></slot>
  </div>
</template>

<script>
export default {
  data () {
    return {
      visible:false,
      param:{
        "id": 20230206091703,
        "version":1,
        "content": {
          "where":{
              "condition":""
          }
        }
      },
      tableData: [],
      total:0,
      currentPage:0
    }
  },
  methods:{
    async listData () {
      const res = await this.$api.requested(this.param)
      this.tableData = res.data
      this.total = res.total
      this.currentPage = res.pageNumber
      console.log(this.tableData);
      
    },
    handleSizeChange(val) {
      // console.log(`每页 ${val} 条`);
      this.param.content.pageSize = val
      this.listData()
    },
    handleCurrentChange(val) {
      // console.log(`当前页: ${val}`);
      this.param.content.pageNumber = val
      this.listData()
    },
    selectRow (row) {
      this.$emit('selectRow',row)
    }
  },
  created () {
  },
}

</script>
<style>
</style>