<template>
  <div class="simulation-scene-page flex-c">
    <Flex v-if="title" jc="sb" ai="c" class="simulation-scene-header">
      <div class="simulation-scene-title">{{ title }}</div>
    </Flex>
    <div class="simulation-scene-main">
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
export default {
  name: 'SimulationScene',
  computed: {
    title() {
      try {
        return this.$route.meta.title
      } catch (error) {
        return ''
      }
    },
  },
}
</script>

<style lang="less" scoped>
.simulation-scene-page {
  height: 100%;
  color: #ffffff;
  .simulation-scene-header {
    height: 50px;
    background-color: #0a2a3d;
    padding: 0 20px;
    line-height: 50px;
    font-size: 18px;
    .simulation-scene-title {
      color: #ffffff;
      font-weight: bolder;
      letter-spacing: 2px;
    }
  }
  .simulation-scene-main {
    flex: 1;
    overflow: hidden;
    background-color: #022234;
  }
}
.simulation-scene-main::v-deep {
  ::-webkit-scrollbar {
    width: 15px;
    background-color: #0c2e3d;
  }
  ::-webkit-scrollbar-button {
    width: 15px;
    height: 25px;
    background-color: transparent;
  }
  ::-webkit-scrollbar-thumb {
    background-color: #386477;
  }

  > div {
    height: 100%;
  }
}
</style>
