<template>
  <div>
    <!-- 货主管理表格 -->

    <table-list v-if="step == 1" @changeStep="changeStep"></table-list>
    <!-- 货主管理 新增更改编辑 -->
    <edit-detail
      v-if="step == 2"
      @changeStep="changeStep"
      :detailItem="detailItem"
      :data="tabListNoTitle"
      @getvalue="getvalue"
    ></edit-detail>

    <detail-page
      v-if="step == 3"
      @changeStep="changeStep"
      :detailItem="detailItem"
      :data="tabListNoTitle"
      @getvalue="getvalue"
    ></detail-page>
  </div>
</template>
<script>
// import { setItemsA } from './js/setConfig.js'

import EditDetail from './edit-detail'
import DetailPage from './detail-page'
// import EditList from './editlist'
import TableList from './list'
import cardlist from './config/cardlist'
export default {
  data() {
    return {
      step: 1,
      detailItem: null,
      tabListNoTitle: cardlist
    }
  },
  components: {
    EditDetail,
    TableList,
    DetailPage
  },
  mounted() {},
  methods: {
    getvalue(value) {
      console.log('grid-form的值为:', value)
    },
    changeStep(obj) {
      this.step = obj.step
      this.detailItem = obj.item
    }
  }
}
</script>
<style lang="less"></style>
