<!--
 * @Desc: ---   ----
 * @Date: 2020-04-22 12:29:22
 * @LastEditors: 王
 * @LastEditTime: 2020-04-22 18:31:36
 -->
<template>
  <view class="u-gap" :style="[gapStyle]"></view>
</template>

<script>
export default {
  props: {
    bgColor: {
      type: String,
      default: "#f3f4f6" // 也即：rgb(243, 244, 246)
    },
    // 高度
    height: {
      type: [String, Number],
      default: 30
    },
    margin: {
      type: [String, Number],
      default: 0
    }
  },
  computed: {
    gapStyle() {
      return {
        backgroundColor: this.bgColor,
        height: this.height + "rpx",
        marginTop: this.margin + "rpx",
        marginBttom: this.margin + "rpx"
      };
    }
  }
};
</script>

<style>
</style>
