<template>
  <div>
    <add @onSuccess="onSuccess"></add>
    <list ref="list">
      <template v-slot:edit="data">
        <edit :data="data" @onSuccess="onSuccess"></edit>
      </template>
      <template v-slot:del="data">
        <ondel :data="data" @onSuccess="onSuccess"></ondel>
      </template>
    </list>
  </div>
</template>

<script>
import  add from './modules/add.vue'
import  edit from './modules/edit.vue'
import  ondel from './modules/del.vue'

import  list from './modules/list.vue'

export default {
  components:{
    list,
    add,
    edit,
    ondel
  },
  methods:{
    onSuccess () {
      this.$refs['list'].listData()
    }
  }
}

</script>
<style>
</style>