<template>
  <el-dialog
    v-if="visible"
    width="900px"
    :title="currentDetail.title+'['+currentDetail.method+':'+currentDetail.version+']'"
    :visible.sync="visible"
  >

    <el-table
      :data="currentDetail.listFields"
      border
      highlight-current-row
    >
      <el-table-column label="参数名" prop="name" width="150"/>
      <el-table-column label="类型" prop="type" width="100"/>
      <el-table-column label="必须">
        <template slot-scope="scope">
          {{ scope.row.required ? '是' : '否' }}
        </template>
      </el-table-column>
      <el-table-column label="说明" prop="describe"/>
    </el-table>
    <div slot="footer" class="dialog-footer">
      <el-button @click="visible = false">关 闭</el-button>
    </div>
  </el-dialog>
</template>

<script>

export default {
  data() {
    return {
      visible: false,
      isLoading: false,
      currentDetail: undefined
    }
  },
  created() {
  },
  methods: {
    open(data) {
      this.visible = true
      this.currentDetail = data
    }
  }
}
</script>
