<template>
  <div class="manage-container">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="网站信息" name="first">
        <sys-config ref="config"></sys-config>
      </el-tab-pane>
      <el-tab-pane label="平台菜单" name="second">
        <menu-index ref="menu"></menu-index>
      </el-tab-pane>
      <el-tab-pane label="小程序菜单" name="three">
        <applets-index ref="applets"></applets-index>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import sysConfig from './components/config/sysConfig';
import menuIndex from './components/menuIndex';
import appletsIndex from './components/applets/appletsIndex';
export default {
  name: 'Index',
  components: {
    sysConfig,
    menuIndex,
    appletsIndex,
  },
  data() {
    return {
      activeName: 'first',
    };
  },
  computed: {
    height() {
      return 500;
    },
  },
  mounted() {},
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
      if (tab.paneName == 'second') {
        this.$refs['menu'].showMenu();
      } else if (tab.paneName == 'first') {
        this.$refs['config'].showConfig();
      } else if (tab.paneName == 'three') {
        this.$refs['applets'].appletsIndex();
      }
    },
  },
};
</script>

<style lang="scss">
.el-submenu__title:hover {
  background-color: rgba(#1890ff, 0.085) !important;
  color: hsla(208, 100%, 55%, 0.95) !important;
}
.el-dialog {
  .el-dialog__header {
    background-color: #1890ff !important;
    padding: 15px 20px;
    text-align: left !important;
    .el-dialog__title {
      color: #e8f4ff !important;
    }
    .el-dialog__headerbtn .el-dialog__close {
      color: #e8f4ff !important;
    }
  }
  .el-dialog__body {
    padding: 20px !important;
    .el-form-item {
      margin-bottom: 10px !important;
      .el-input {
        width: 100% !important;
      }
      .el-select {
        width: 100% !important;
      }
      .el-cascader {
        width: 100% !important;
      }
    }
    .el-form-item:last-child {
      margin-bottom: 20px !important;
    }
  }
  .dialog-footer {
    text-align: right;
  }
}
</style>
