<template>
  <el-tabs v-model="tabActive" type="card" @tab-click="handleClick" class="market-tabs">
    <el-tab-pane label="图文素材消息" name="first">
      <materia-list></materia-list>
      <push-detail></push-detail>
      <material-details></material-details>
      <article-details></article-details>
    </el-tab-pane>
    <el-tab-pane label="营销模版消息" name="second">
      <temp-list></temp-list>
    </el-tab-pane>
    <el-tab-pane label="短信营销消息" name="third">表格</el-tab-pane>
  </el-tabs>
</template>
<script>
import MateriaList from './MateriaList'
import PushDetail from './PushList'
import MaterialDetails from './MaterialDetails'
import ArticleDetails from './ArticleDetails'
import TempList from './TempList'

export default {
  data () {
    return {
      tabActive: 'first'
    }
  },
  components: {
    PushDetail,
    MateriaList,
    MaterialDetails,
    ArticleDetails,
    TempList
  },
  created () {
    // this.getData()
  },
  methods: {
    handleClick (tab, event) {
      console.log(tab, event)
    },
    getData () {
      this.axios
        .post('http://rap2api.taobao.org/app/mock/115626/getarticlesummary', {
          mediaId: '1'
        })
        .then(res => {
          console.log('res', res)
        })
    }
  }
}
</script>
<style lang="stylus" scoped>
.market-tabs
  >>>.el-tabs__nav
    margin-left 36px
    border none
    background-color transparent
  >>>.el-tabs__item
    color rgb(115, 135, 156)
    border 1px solid #e4e7ed
    margin-right 10px
    background-color #e4e7ed
    border-radius 4px
  >>>.el-tabs__item:hover
    color #000
  >>>.el-tabs__item.is-active
    background #fff
    color #000
    border-right 5px solid #e4e7ed
    border-bottom 1px solid #e4e7ed
  >>>.el-tabs__item:first-child
    border-left 2px solid #e4e7ed
  >>>.el-tabs__header
    border none
  >>>.el-tabs__nav .el-tabs__item
    margin-right 12px
</style>
