Newer
Older
robot_dog_patrol_front / src / views / home / dashboard / fullScreen-components / layout.vue
<!--
  Description: 综合大屏 - 数据展示-基础组件
  Author: 李亚光
  Date: 2024-09-18
 -->
<script lang="ts" setup name="FullScreenBasicLayout">
const $props = defineProps({
  width: {
    type: Number,
    required: true,
  },
  height: {
    type: Number,
    required: true,
  },
  title: {
    type: String,
    default: '',
  },
  subtitle: {
    type: String,
    default: '',
  },
})
</script>

<template>
  <div class="base" :style="{ height: `${$props.height}px`, width: `${$props.width}px` }">
    <div class="header-container">
      <div class="header">
        <div class="title">
          {{ $props.title }}
        </div>
        <div class="english">
          {{ $props.subtitle }}
        </div>
      </div>
    </div>
    <div class="content">
      <slot name="content" />
    </div>
  </div>
</template>

<style lang="scss" scoped>
.base {
  width: 345px;
  height: 250px;
  // background-color: aliceblue;
  // position: absolute;
  // z-index: 9;
  // top: 100px;
  // left: 15px;

  .header-container {
    background: url("@/assets/images/dashboard/列表首行.png") no-repeat center / cover;
    height: 36px;
    width: 100%;
    display: flex;
    justify-content: center;
    flex-direction: column;
    box-sizing: border-box;
  }

  .header {
    background: url("@/assets/images/dashboard/小标题.png") no-repeat center / cover;
    height: 16px;
    width: 100%;
    // padding-left: 20px;
    line-height: 16px;
    box-sizing: border-box;
    margin-left: 5px;
    display: flex;
    justify-content: space-between;
    padding: 0 15px;

    .title {
      color: #fff;
      font-weight: 700;
      padding-left: 20px;
      box-sizing: border-box;
    }

    .english {
      color: #83b7df;
      font-size: 10px;
      font-weight: 700;
      padding-left: 30px;
      box-sizing: border-box;
    }
  }
}
</style>