<template>
  <div>
    <basic-container v-if="show">
      <avue-crud :data="dataList" ref="crud" :option="option">
        <template slot="menuLeft" slot-scope="{size}">
          <el-button type="primary" :size="size" @click="rowSave">新增</el-button>
        </template>
      </avue-crud>
    </basic-container>
    <detail-page v-else @backToList="backToList"></detail-page>
  </div>
</template>

<script>
import detailPage from './detailPage'
export default {
  name: "index",
  components: {
    detailPage
  },
  data(){
    return{
      show:true,
      dataList:[
        {fileName:'1111111111'}
      ],
      option:{
        align:'center',
        index: true,
        addBtn: false,
        column:[{
            label: '订单号',
            prop: 'fileName',
            index: 1,
            width: 140,
            cell: true,
            overHidden: true,
            search:true,
          }]
      }
    }
  },
  methods:{
    rowSave(){
      this.show = false
    },
    backToList(){
      this.show = true
    }
  }
}
</script>

<style scoped>

</style>
