<template>
  <div class="manage-container">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane :label="$t('dfunction.slryxbb')" name="first">
        <water-day ref="water"></water-day>
      </el-tab-pane>
      <el-tab-pane :label="$t('dfunction.dlryxbb')" name="second">
        <elec-day ref="elec"></elec-day>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
import elecDay from './components/elecDay';
import waterDay from './components/waterDay';
export default {
  name: 'Index',
  components: {
    elecDay,
    waterDay,
  },
  data() {
    return {
      activeName: 'first',
    };
  },
  computed: {
    height() {
      return 500;
    },
  },
  mounted() {},
  methods: {
    handleClick(tab) {
      if (tab.paneName == 'first') {
        this.$refs['water'].showData();
      } else if (tab.paneName == 'second') {
        this.$refs['elec'].showData();
      }
    },
  },
};
</script>

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