<template>
  <div class="manage-container">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="平台三级按钮" name="first">
        <platform-index ref="platform"></platform-index>
      </el-tab-pane>
      <el-tab-pane label="小程序三级按钮" name="second">
        <program-index ref="program"></program-index>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import platformIndex from './platform/index';
import programIndex from './program/index';
export default {
  components: {
    platformIndex,
    programIndex,
  },
  data() {
    return {
      activeName: 'first',
    };
  },
  methods: {
    handleClick(tab, event) {
      if (tab.paneName == 'first') {
        this.$refs['platform'].fetchData();
      } else if (tab.paneName == 'second') {
        this.$refs['program'].fetchData();
      }
    },
  },
};
</script>

<style lang="scss">
.el-submenu__title:hover {
  background-color: rgba(#1890ff, 0.085) !important;
  color: hsla(208, 100%, 55%, 0.95) !important;
}
</style>

<style lang="scss" scoped>
.el-form-item {
  margin-bottom: 10px !important;
  .el-input {
    width: 360px !important;
  }
  .el-select {
    width: 360px !important;
  }
  .el-cascader {
    width: 360px !important;
  }
}
</style>
