Phone.vue 803 Bytes
<!--
 * @Description: 手机框组件
 * @Author: huyue
 * @Date: 2024-01-26 11:50:52
 * @LastEditors: huyue
 * @LastEditTime: 2024-01-26 15:18:05
-->
<template>
  <div class="phone-box" :style="{backgroundImage: `url(${require(`assets/images/${imgName}.png`)}`}">
    <slot name="content"></slot>
  </div>
</template>

<script>
export default {
  name: 'Phone',
  props: {
    imgName: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
    }
  }
}
</script>

<style lang="scss">
.phone {
  &-box {
    width: 150px;
    height: 100%;
    // height: 29.81vh;
    // background: url(../../../assets/images/ai-dialogue.png) ;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
  }
}
</style>