<template>
  <div class="flood-panel">
    <div class="panel-title">
      {{ title }}
      <slot name="title" />
    </div>
    <div class="panel-main">
      <slot />
    </div>
  </div>
</template>

<script>
export default {
  name: 'BigPanel',
  props: {
    title: {
      type: String,
      default: '加载中'
    }
  }
}
</script>

<style lang="scss" scoped>
.flood-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 400px;
  background-color: rgba(3, 35, 79, 0.6);
  padding: 40px 10px 10px;
  .panel-title {
    display: flex;
    align-items: center;
    padding-left: 30px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: url("~@/assets/images/flood/title_bg.gif") no-repeat bottom
      center / 100% 100%;
    color: #e8eff6;
    font-size: 18px;
    .title-btn-box {
      display: flex;
      position: absolute;
      top: 10px;
      right: 0;
      height: 20px;
      button {
        width: 70px;
        height: 100%;
        margin-left: 5px;
        background-color: rgba(96, 255, 246, 0.5);
        color: #fff;
        &.active {
          background-color: rgba(227, 133, 0, 0.5);
        }
      }
    }
    .title-select {
      position: absolute;
      top: 10px;
      right: 0;
      width: 100px;
      height: 20px;
      background-color: pink;
    }
  }
  .panel-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 100%;
    flex: 1;
  }
  .btn-box {
    display: flex;
    justify-content: space-evenly;
    width: 100%;
    height: 20px;
    margin: 15px 0;
    button {
      height: 20px;
      padding: 0 10px;
      color: #fff;
      font-size: 14px;
      background-color: rgba(96, 255, 246, 0.5);
      &:hover {
        background-color: rgba(227, 133, 0, 0.6);
      }
      &.btnActive {
        background-color: rgba(227, 133, 0, 0.6);
      }
    }
  }
}
</style>
