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

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

<style lang="scss" scoped>
.home-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 40px 20px 15px;
  background-color: rgba(3, 35, 79, 0.6);
  .title {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    line-height: 40px;
    padding-left: 30px;
    background: url("~@/assets/images/home/title_bg.gif") no-repeat top center /
      100% 100%;
    color: #e8eff6;
    font-size: 18px;
  }
  .home-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 100%;
    flex: 1;
  }
}
</style>
