<template>
  <div>
    <el-button size="small" type="text" @click="onShow">详 情</el-button>
  </div>
</template>

<script>
export default {
  props:['data','detailPath','idName'],
  components:{
  },
  computed:{
	},
  data () {
    return {
    }
  },
  methods:{
    onShow () {
      let key = ''
      if (this.idName instanceof Array) {
        key = this.idName[1]
      } else {
        key = this.idName
      }
      let query = {id:this.data[key],rowindex:this.data.rowindex - 1}
      this.$router.push({path:this.detailPath.path,query:Object.assign({},query,this.detailPath.param)})
      this.$store.dispatch('changeDetailDrawer',true)
    }
  },
  watch:{
  }
}

</script>
<style>
</style>
<style scoped>
.detail__panel{
  background:#f1f2f3;
  overflow-y: scroll;
  font-size: 14px;
  color:#666;
  height:100vh;
}
</style>