<template>
  <Table :columns="columns" :data="data">

  </Table>
</template>
<script lang="ts">
import { Component, Prop, Vue, Emit } from "vue-property-decorator";

@Component
export default class BuildDeploy extends Vue {
  columns : Array<any> = [
       {
            title: '组件名称',
            key: 'title'
          },
          {
            title: '升级部署信息',
            key: 'info',
              render: (h, params) => {
                  let info=params.row.info=='-1'?"该组件版本大于升级包中的版本，将不执行操作":params.row.info
                  return h('span',info)
              }
          }
   ]

   data : Array<any> = []


   setTableData(table){
     this.data=[];
     for(let key in table.compDeployInfo){
       this.data.push({title:key,info:table.compDeployInfo[key]==-1?'已经是最新版本或更高版本，将不执行操作。':table.compDeployInfo[key]});
     }
   }
}
</script>



