<template>
  <div>
    <EasyDataList :data-source-name="dataSourceName" :diy-colums="columns"
                  :action-props="{showExportBtn:false,showAddBtn:false}"
                  :table-props="{isOperate: false}"
                  @handleCurrentChange="handleCurrentChange">

    </EasyDataList>
  </div>
</template>
<script lang="jsx">

export default {
  name: 'TemplateChooes',
  data() {
    return {
      dataSourceName: 'easy_template_info',
      currentData: {}, //选中的数据
      columns: [
        {
          label: 'Id',
          prop: 'id',
        }, {
          label: '模板名称',
          prop: 'keyInfoObject.template_name',
        },
        {
          label: '备注',
          prop: 'keyInfoObject.template_remark',
        },
      ]
    }
  },
  methods: {
    getData() {
      return {value: this.currentData.id, label: this.currentData.keyInfoObject.template_name};
    },
    handleCurrentChange(row) {
      this.currentData = row
    }
  }
}
</script>
