<template>
  <div class="sale-wrap">
    <slot></slot>
    <div class="sale-header">
      <div class="left-block border" :style="{ width: leftWidth + 'px' }">
        <slot name="left"></slot>
      </div>
      <div class="right-block border custom-scroll">
        <slot name="right"></slot>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    leftWidth: {
      type: Number,
      default: 360
    }
  }
}
</script>

<style lang="scss" scoped>
* {
  box-sizing: border-box;
}

.sale-wrap {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  background: #F8F9FD;
}
.sale-header {
  display: flex;
  flex: 1;
  .left-block {
    width: 360px;
    padding: 10px;
    margin-right: -10px;
    height: calc(100vh - 120px);
  }
  .right-block {
    flex: 1;
    overflow: auto;
    padding: 10px;
    height: calc(100vh - 130px);
  }
}
.sale-footer {
  height: 100px;
  background: #fff;
  margin: 10px;
  margin-top: 0;
}
</style>
