<template>
  <div class="el-background">
    <!-- 背景区 -->
    <div class="el-background-fill">
      <!-- 当bgUrl为空时。不会触发error事件 -->
      <img
        v-if='src'
        class="el-background-fill-image"
        :src="src"
      />
    </div>
    <!-- 遮罩层 -->
    <div class="el-background-shade"></div>
  </div>
</template>

<script>
export default {
  name: 'ElBackground',
  props: {
    src: String
  }
};
</script>
