<template>
  <div>
    <div style="margin: 0 15px">
      <el-table
        :data="tableData"
        border
        stripe
        :header-cell-style="headClass"
        :height="Height"
      >
        <el-table-column
          prop="numCode"
          label="变量编码"
          width=""
        ></el-table-column>
        <el-table-column
          prop="numName"
          label="变量名称"
          width=""
        ></el-table-column>
        <el-table-column fixed="right" label="操作" width="100">
          <template #default="scope">
            <el-button
              type="text"
              size="small"
              style="color: #409eff"
              @click.prevent="Update(scope.row)"
            >
              编辑
            </el-button>
          </template>
        </el-table-column>
        <el-table-column
          v-for="row in tablesRow"
          :key="row"
          :prop="row.prop"
          :label="row.label"
          width=""
        ></el-table-column>
      </el-table>
    </div>
  </div>
</template>
<script>
// import { useStore } from "vuex";
import { defineComponent } from 'vue'

export default defineComponent({
  name: 'consumConfig',
  components: {},
  props: {
    Height: String,
  },
  setup() {
    const Update = (row) => {
      console.log('', row)
    }

    // 表头样式设置
    const headClass = () => {
      return 'background:#FAFAFA !important;color: black;'
    }

    return {
      headClass,
      Update, //修改偏差配置事件
      tableData: [
        {
          numCode: '05-01',
          numName: 'Tom',
          time: '0',
        },
        {
          numCode: '05-01',
          numName: 'Tom',
        },
        {
          numCode: '05-01',
          numName: 'Tom',
        },
        {
          numCode: '05-01',
          numName: 'Tom',
        },
        {
          numCode: '05-01',
          numName: 'Tom',
        },
        {
          numCode: '05-01',
          numName: 'Tom',
        },
        {
          numCode: '05-01',
          numName: 'Tom',
        },
        {
          numCode: '05-01',
          numName: 'Tom',
        },
      ],
      tablesRow: [
        {
          prop: 'time',
          label: '00.00',
        },
      ],
    }
  },
})
</script>